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


engines/ccgost/gost_sign.c:65:5: Call
63.           goto err;
64.       }
65.       BN_CTX_start(ctx);
          ^
66.       newsig = DSA_SIG_new();
67.       if (!newsig) {

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

engines/ccgost/gost_sign.c:78:5: Call
76.           goto err;
77.       }
78.       BN_mod(tmp, md, dsa->q, ctx);
          ^
79.       if (BN_is_zero(tmp)) {
80.           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:89:13: Call
87.               BN_rand_range(k, dsa->q);
88.               /* generate r = (a^x mod p) mod q */
89.               BN_mod_exp(tmp, dsa->g, k, dsa->p, ctx);
                  ^
90.               if (!(newsig->r)) {
91.                   newsig->r = BN_new();

crypto/bn/bn_exp.c:191:1: Parameter `ctx->stack.depth`
  189.   }
  190.   
  191. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
  192.                  BN_CTX *ctx)
  193.   {

crypto/bn/bn_exp.c:248:19: Call
  246.               && (BN_get_flags(p, BN_FLG_CONSTTIME) == 0)) {
  247.               BN_ULONG A = a->d[0];
  248.               ret = BN_mod_exp_mont_word(r, A, p, m, ctx, NULL);
                           ^
  249.           } else
  250.   # endif

crypto/bn/bn_exp.c:1134:1: Parameter `ctx->stack.depth`
    1132.   }
    1133.   
    1134. > int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p,
    1135.                            const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
    1136.   {

engines/ccgost/gost_sign.c:97:13: Call
95.                   }
96.               }
97.               BN_mod(newsig->r, tmp, dsa->q, ctx);
                   ^
98.           }
99.           while (BN_is_zero(newsig->r));

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:101:9: Call
99.           while (BN_is_zero(newsig->r));
100.           /* generate s = (xr + k(Hm)) mod q */
101.           BN_mod_mul(tmp, dsa->priv_key, newsig->r, dsa->q, ctx);
               ^
102.           BN_mod_mul(tmp2, k, md, dsa->q, ctx);
103.           if (!newsig->s) {

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:240:1: Parameter `ctx->stack.depth`
    238.   }
    239.   
    240. > void BN_CTX_start(BN_CTX *ctx)
    241.   {
    242.       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:240:1: Parameter `ctx->stack.depth`
      238.   }
      239.   
      240. > void BN_CTX_start(BN_CTX *ctx)
      241.   {
      242.       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:254:1: Parameter `ctx->stack.depth`
      252.   }
      253.   
      254. > void BN_CTX_end(BN_CTX *ctx)
      255.   {
      256.       CTXDBG_ENTRY("BN_CTX_end", ctx);

crypto/bn/bn_ctx.c:260:27: Call
      258.           ctx->err_stack--;
      259.       else {
      260.           unsigned int fp = BN_STACK_pop(&ctx->stack);
                                       ^
      261.           /* Does this stack frame have anything to release? */
      262.           if (fp < ctx->used)

crypto/bn/bn_ctx.c:330:1: <LHS trace>
328.   }
329.   
330. > static unsigned int BN_STACK_pop(BN_STACK *st)
331.   {
332.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:330:1: Parameter `st->depth`
        328.   }
        329.   
        330. > static unsigned int BN_STACK_pop(BN_STACK *st)
        331.   {
        332.       return st->indexes[--(st->depth)];

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