crypto/jpake/jpake.c:207: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned32 by call to `BN_mod_sub`.
Showing all 27 steps of the trace


crypto/jpake/jpake.c:187:1: Parameter `ctx->ctx->stack.depth`
185.    * Note that p->gx has already been calculated
186.    */
187. > static void generate_zkp(JPAKE_STEP_PART *p, const BIGNUM *x,
188.   			 const BIGNUM *zkpg, JPAKE_CTX *ctx)
189.       {

crypto/jpake/jpake.c:200:5: Call
198.       BN_rand_range(r, ctx->p.q);
199.      /* g^r */
200.       BN_mod_exp(p->zkpx.gr, zkpg, r, ctx->p.p, ctx->ctx);
           ^
201.   
202.      /* h=hash... */

crypto/bn/bn_exp.c:163:1: Parameter `ctx->stack.depth`
  161.   
  162.   
  163. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
  164.   	       BN_CTX *ctx)
  165.   	{

crypto/bn/bn_exp.c:219:8: Call
  217.   			{
  218.   			BN_ULONG A = a->d[0];
  219.   			ret=BN_mod_exp_mont_word(r,A,p,m,ctx,NULL);
                ^
  220.   			}
  221.   		else

crypto/bn/bn_exp.c:724:1: Parameter `ctx->stack.depth`
    722.   	}
    723.   
    724. > int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p,
    725.                            const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
    726.   	{

crypto/jpake/jpake.c:206:5: Call
204.   
205.      /* b = r - x*h */
206.       BN_mod_mul(t, x, h, ctx->p.q, ctx->ctx);
           ^
207.       BN_mod_sub(p->zkpx.b, r, t, ctx->p.q, ctx->ctx);
208.   

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

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

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

crypto/bn/bn_mod.c:198:2: Call
  196.   	ret=1;
  197.   err:
  198.   	BN_CTX_end(ctx);
          ^
  199.   	return(ret);
  200.   	}

crypto/bn/bn_ctx.c:270:1: Parameter `ctx->stack.depth`
    268.   	}
    269.   
    270. > void BN_CTX_end(BN_CTX *ctx)
    271.   	{
    272.   	CTXDBG_ENTRY("BN_CTX_end", ctx);

crypto/jpake/jpake.c:207:5: Call
205.      /* b = r - x*h */
206.       BN_mod_mul(t, x, h, ctx->p.q, ctx->ctx);
207.       BN_mod_sub(p->zkpx.b, r, t, ctx->p.q, ctx->ctx);
           ^
208.   
209.      /* cleanup */

crypto/bn/bn_mod.c:159:1: Parameter `ctx->stack.depth`
  157.   
  158.   
  159. > int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx)
  160.   	{
  161.   	if (!BN_sub(r, a, b)) return 0;

crypto/bn/bn_mod.c:162:9: Call
  160.   	{
  161.   	if (!BN_sub(r, a, b)) return 0;
  162.   	return BN_nnmod(r, r, m, ctx);
                 ^
  163.   	}
  164.   

crypto/bn/bn_mod.c:127:1: Parameter `ctx->stack.depth`
    125.   
    126.   
    127. > int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
    128.   	{
    129.   	/* like BN_mod, but returns non-negative remainder

crypto/bn/bn_mod.c:132:8: Call
    130.   	 * (i.e.,  0 <= r < |d|  always holds) */
    131.   
    132.   	if (!(BN_mod(r,m,d,ctx)))
                  ^
    133.   		return 0;
    134.   	if (!r->neg)

crypto/bn/bn_div.c:181:1: Parameter `ctx->stack.depth`
      179.   static int BN_div_no_branch(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num,
      180.           const BIGNUM *divisor, BN_CTX *ctx);
      181. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
      182.   	   BN_CTX *ctx)
      183.   	{

crypto/bn/bn_div.c:203:10: Call
      201.   	if ((BN_get_flags(num, BN_FLG_CONSTTIME) != 0) || (BN_get_flags(divisor, BN_FLG_CONSTTIME) != 0))
      202.   		{
      203.   		return BN_div_no_branch(dv, rm, num, divisor, ctx);
                      ^
      204.   		}
      205.   

crypto/bn/bn_div.c:425:1: Parameter `ctx->stack.depth`
        423.    * branches that may leak sensitive information.
        424.    */
        425. > static int BN_div_no_branch(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, 
        426.   	const BIGNUM *divisor, BN_CTX *ctx)
        427.   	{

crypto/bn/bn_div.c:445:2: Call
        443.   		}
        444.   
        445.   	BN_CTX_start(ctx);
                ^
        446.   	tmp=BN_CTX_get(ctx);
        447.   	snum=BN_CTX_get(ctx);

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

crypto/bn/bn_div.c:641:2: Call
        639.   		}
        640.   	bn_correct_top(res);
        641.   	BN_CTX_end(ctx);
                ^
        642.   	return(1);
        643.   err:

crypto/bn/bn_ctx.c:270:1: Parameter `ctx->stack.depth`
          268.   	}
          269.   
          270. > void BN_CTX_end(BN_CTX *ctx)
          271.   	{
          272.   	CTXDBG_ENTRY("BN_CTX_end", ctx);

crypto/bn/bn_ctx.c:277:21: Call
          275.   	else
          276.   		{
          277.   		unsigned int fp = BN_STACK_pop(&ctx->stack);
                                     ^
          278.   		/* Does this stack frame have anything to release? */
          279.   		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:9: Binary operation: ([0, +oo] - 1):unsigned32 by call to `BN_mod_sub` 
            351.   static unsigned int BN_STACK_pop(BN_STACK *st)
            352.   	{
            353.   	return st->indexes[--(st->depth)];
                           ^
            354.   	}
            355.   
