engines/ccgost/gost_sign.c:86: 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:60:5: Call
58.       /* check if H(M) mod q is zero */
59.       BN_CTX *ctx = BN_CTX_new();
60.       BN_CTX_start(ctx);
          ^
61.       if (!newsig) {
62.           GOSTerr(GOST_F_GOST_DO_SIGN, ERR_R_MALLOC_FAILURE);

crypto/bn/bn_ctx.c:253:1: Parameter `ctx->stack.depth`
  251.   }
  252.   
  253. > void BN_CTX_start(BN_CTX *ctx)
  254.   {
  255.       CTXDBG_ENTRY("BN_CTX_start", ctx);

engines/ccgost/gost_sign.c:68:5: Call
66.       k = BN_CTX_get(ctx);
67.       tmp2 = BN_CTX_get(ctx);
68.       BN_mod(tmp, md, dsa->q, ctx);
          ^
69.       if (BN_is_zero(tmp)) {
70.           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:79:13: Call
77.               BN_rand_range(k, dsa->q);
78.               /* generate r = (a^x mod p) mod q */
79.               BN_mod_exp(tmp, dsa->g, k, dsa->p, ctx);
                  ^
80.               if (!(newsig->r))
81.                   newsig->r = BN_new();

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:82:13: Call
80.               if (!(newsig->r))
81.                   newsig->r = BN_new();
82.               BN_mod(newsig->r, tmp, dsa->q, ctx);
                  ^
83.           }
84.           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:86:9: Call
84.           while (BN_is_zero(newsig->r));
85.           /* generate s = (xr + k(Hm)) mod q */
86.           BN_mod_mul(tmp, dsa->priv_key, newsig->r, dsa->q, ctx);
              ^
87.           BN_mod_mul(tmp2, k, md, dsa->q, ctx);
88.           if (!newsig->s)

crypto/bn/bn_mod.c:187:1: Parameter `ctx->stack.depth`
  185.   
  186.   /* slow but works */
  187. > int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
  188.                  BN_CTX *ctx)
  189.   {

crypto/bn/bn_mod.c:197:5: Call
  195.       bn_check_top(m);
  196.   
  197.       BN_CTX_start(ctx);
             ^
  198.       if ((t = BN_CTX_get(ctx)) == NULL)
  199.           goto err;

crypto/bn/bn_ctx.c:253:1: Parameter `ctx->stack.depth`
    251.   }
    252.   
    253. > void BN_CTX_start(BN_CTX *ctx)
    254.   {
    255.       CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/bn/bn_mod.c:204:14: Call
  202.               goto err;
  203.       } else {
  204.           if (!BN_mul(t, a, b, ctx))
                      ^
  205.               goto err;
  206.       }

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:253:1: Parameter `ctx->stack.depth`
      251.   }
      252.   
      253. > void BN_CTX_start(BN_CTX *ctx)
      254.   {
      255.       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:267:1: Parameter `ctx->stack.depth`
      265.   }
      266.   
      267. > void BN_CTX_end(BN_CTX *ctx)
      268.   {
      269.       CTXDBG_ENTRY("BN_CTX_end", ctx);

crypto/bn/bn_ctx.c:273:27: Call
      271.           ctx->err_stack--;
      272.       else {
      273.           unsigned int fp = BN_STACK_pop(&ctx->stack);
                                       ^
      274.           /* Does this stack frame have anything to release? */
      275.           if (fp < ctx->used)

crypto/bn/bn_ctx.c:351:1: <LHS trace>
349.   }
350.   
351. > static unsigned int BN_STACK_pop(BN_STACK *st)
352.   {
353.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:351:1: Parameter `st->depth`
        349.   }
        350.   
        351. > static unsigned int BN_STACK_pop(BN_STACK *st)
        352.   {
        353.       return st->indexes[--(st->depth)];

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