engines/ccgost/gost_sign.c:204: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned32 by call to `BN_mod_mul`.
Showing all 22 steps of the trace


engines/ccgost/gost_sign.c:177:5: Call
175.       }
176.   
177.       BN_CTX_start(ctx);
           ^
178.       if (BN_cmp(sig->s, dsa->q) >= 1 || BN_cmp(sig->r, dsa->q) >= 1) {
179.           GOSTerr(GOST_F_GOST_DO_VERIFY, GOST_R_SIGNATURE_PARTS_GREATER_THAN_Q);

crypto/bn/bn_ctx.c:227:1: Parameter `ctx->stack.depth`
  225.   }
  226.   
  227. > void BN_CTX_start(BN_CTX *ctx)
  228.   {
  229.       CTXDBG_ENTRY("BN_CTX_start", ctx);

engines/ccgost/gost_sign.c:197:5: Call
195.       }
196.   
197.       BN_mod(tmp, md, dsa->q, ctx);
           ^
198.       if (BN_is_zero(tmp)) {
199.           BN_one(md);

crypto/bn/bn_div.c:189:1: Parameter `ctx->stack.depth`
  187.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
  188.    */
  189. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
  190.              BN_CTX *ctx)
  191.   {

engines/ccgost/gost_sign.c:203:5: Call
201.       BN_copy(q2, dsa->q);
202.       BN_sub_word(q2, 2);
203.       BN_mod_exp(v, md, q2, dsa->q, ctx);
           ^
204.       BN_mod_mul(z1, sig->s, v, dsa->q, ctx);
205.       BN_sub(tmp, dsa->q, sig->r);

crypto/bn/bn_exp.c:197:1: Parameter `ctx->stack.depth`
  195.   }
  196.   
  197. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
  198.                  BN_CTX *ctx)
  199.   {

crypto/bn/bn_exp.c:254:19: Call
  252.               && (BN_get_flags(p, BN_FLG_CONSTTIME) == 0)) {
  253.               BN_ULONG A = a->d[0];
  254.               ret = BN_mod_exp_mont_word(r, A, p, m, ctx, NULL);
                           ^
  255.           } else
  256.   # endif

crypto/bn/bn_exp.c:1142:1: Parameter `ctx->stack.depth`
    1140.   }
    1141.   
    1142. > int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p,
    1143.                            const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
    1144.   {

engines/ccgost/gost_sign.c:204:5: Call
202.       BN_sub_word(q2, 2);
203.       BN_mod_exp(v, md, q2, dsa->q, ctx);
204.       BN_mod_mul(z1, sig->s, v, dsa->q, ctx);
           ^
205.       BN_sub(tmp, dsa->q, sig->r);
206.       BN_mod_mul(z2, tmp, v, dsa->p, ctx);

crypto/bn/bn_mod.c:179:1: Parameter `ctx->stack.depth`
  177.   
  178.   /* slow but works */
  179. > int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
  180.                  BN_CTX *ctx)
  181.   {

crypto/bn/bn_mod.c:189:5: Call
  187.       bn_check_top(m);
  188.   
  189.       BN_CTX_start(ctx);
             ^
  190.       if ((t = BN_CTX_get(ctx)) == NULL)
  191.           goto err;

crypto/bn/bn_ctx.c:227:1: Parameter `ctx->stack.depth`
    225.   }
    226.   
    227. > void BN_CTX_start(BN_CTX *ctx)
    228.   {
    229.       CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/bn/bn_mod.c:196:14: Call
  194.               goto err;
  195.       } else {
  196.           if (!BN_mul(t, a, b, ctx))
                      ^
  197.               goto err;
  198.       }

crypto/bn/bn_mul.c:883:1: Parameter `ctx->stack.depth`
    881.   #endif                          /* BN_RECURSION */
    882.   
    883. > int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
    884.   {
    885.       int ret = 0;

crypto/bn/bn_mul.c:909:5: Call
    907.       top = al + bl;
    908.   
    909.       BN_CTX_start(ctx);
               ^
    910.       if ((r == a) || (r == b)) {
    911.           if ((rr = BN_CTX_get(ctx)) == NULL)

crypto/bn/bn_ctx.c:227:1: Parameter `ctx->stack.depth`
      225.   }
      226.   
      227. > void BN_CTX_start(BN_CTX *ctx)
      228.   {
      229.       CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/bn/bn_mul.c:1033:5: Call
    1031.    err:
    1032.       bn_check_top(r);
    1033.       BN_CTX_end(ctx);
                ^
    1034.       return (ret);
    1035.   }

crypto/bn/bn_ctx.c:241:1: Parameter `ctx->stack.depth`
      239.   }
      240.   
      241. > void BN_CTX_end(BN_CTX *ctx)
      242.   {
      243.       CTXDBG_ENTRY("BN_CTX_end", ctx);

crypto/bn/bn_ctx.c:247:27: Call
      245.           ctx->err_stack--;
      246.       else {
      247.           unsigned int fp = BN_STACK_pop(&ctx->stack);
                                       ^
      248.           /* Does this stack frame have anything to release? */
      249.           if (fp < ctx->used)

crypto/bn/bn_ctx.c:319:1: <LHS trace>
317.   }
318.   
319. > static unsigned int BN_STACK_pop(BN_STACK *st)
320.   {
321.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:319:1: Parameter `st->depth`
        317.   }
        318.   
        319. > static unsigned int BN_STACK_pop(BN_STACK *st)
        320.   {
        321.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:321:12: Binary operation: ([0, +oo] - 1):unsigned32 by call to `BN_mod_mul` 
        319.   static unsigned int BN_STACK_pop(BN_STACK *st)
        320.   {
        321.       return st->indexes[--(st->depth)];
                          ^
        322.   }
        323.   
