crypto/bn/bn_sqrt.c:148: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned64 by call to `BN_mod_exp`.
Showing all 25 steps of the trace


crypto/bn/bn_sqrt.c:62:1: Parameter `p->top`
60.   
61.   
62. > BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) 
63.   /* Returns 'ret' such that
64.    *      ret^2 == a (mod p),

crypto/bn/bn_sqrt.c:128:7: Call
126.   
127.   	/* A = a mod p */
128.   	if (!BN_nnmod(A, a, p, ctx)) goto end;
             ^
129.   
130.   	/* now write  |p| - 1  as  2^e*q  where  q  is odd */

crypto/bn/bn_mod.c:127:1: Parameter `d->top`
  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 `divisor->top`
    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_sqrt.c:132:10: Call
130.   	/* now write  |p| - 1  as  2^e*q  where  q  is odd */
131.   	e = 1;
132.   	while (!BN_is_bit_set(p, e))
                ^
133.   		e++;
134.   	/* we'll set  q  later (if needed) */

crypto/bn/bn_lib.c:757:1: Parameter `a->top`
  755.   	}
  756.   
  757. > int BN_is_bit_set(const BIGNUM *a, int n)
  758.   	{
  759.   	int i,j;

crypto/bn/bn_sqrt.c:145:8: Call
143.   		 * so we can use exponent  (|p|+1)/4,  i.e.  (|p|-3)/4 + 1.
144.   		 */
145.   		if (!BN_rshift(q, p, 2)) goto end;
              ^
146.   		q->neg = 0;
147.   		if (!BN_add_word(q, 1)) goto end;

crypto/bn/bn_shift.c:168:1: Parameter `r->top`
  166.   	}
  167.   
  168. > int BN_rshift(BIGNUM *r, const BIGNUM *a, int n)
  169.   	{
  170.   	int i,j,nw,lb,rb;

crypto/bn/bn_sqrt.c:147:8: Call
145.   		if (!BN_rshift(q, p, 2)) goto end;
146.   		q->neg = 0;
147.   		if (!BN_add_word(q, 1)) goto end;
              ^
148.   		if (!BN_mod_exp(ret, A, q, p, ctx)) goto end;
149.   		err = 0;

crypto/bn/bn_word.c:126:1: Parameter `a->top`
  124.   	}
  125.   
  126. > int BN_add_word(BIGNUM *a, BN_ULONG w)
  127.   	{
  128.   	BN_ULONG l;

crypto/bn/bn_sqrt.c:148:8: Call
146.   		q->neg = 0;
147.   		if (!BN_add_word(q, 1)) goto end;
148.   		if (!BN_mod_exp(ret, A, q, p, ctx)) goto end;
              ^
149.   		err = 0;
150.   		goto vrfy;

crypto/bn/bn_exp.c:163:1: Parameter `a->top`
  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:223:8: Call
  221.   		else
  222.   #  endif
  223.   			ret=BN_mod_exp_mont(r,a,p,m,ctx,NULL);
                ^
  224.   		}
  225.   	else

crypto/bn/bn_exp.c:371:1: Parameter `a->top`
    369.   
    370.   
    371. > int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
    372.   		    const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
    373.   	{

crypto/bn/bn_exp.c:384:10: Call
    382.   	if (BN_get_flags(p, BN_FLG_CONSTTIME) != 0)
    383.   		{
    384.   		return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
                    ^
    385.   		}
    386.   

crypto/bn/bn_exp.c:574:1: Parameter `a->top`
      572.    * http://www.daemonology.net/hyperthreading-considered-harmful/)
      573.    */
      574. > int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
      575.   		    const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
      576.   	{

crypto/bn/bn_exp.c:650:8: Call
      648.   	if (a->neg || BN_ucmp(a,m) >= 0)
      649.   		{
      650.   		if (!BN_mod(am,a,m,ctx))
                    ^
      651.   			goto err;
      652.   		aa= am;

crypto/bn/bn_div.c:181:1: Parameter `num->top`
        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:204:10: Call
        202.   	if ((BN_get_flags(num, BN_FLG_CONSTTIME) != 0) || (BN_get_flags(divisor, BN_FLG_CONSTTIME) != 0))
        203.   		{
        204.   		return BN_div_no_branch(dv, rm, num, divisor, ctx);
                        ^
        205.   		}
        206.   

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

crypto/bn/bn_div.c:460:8: Call
          458.   	sdiv->neg=0;
          459.   	norm_shift+=BN_BITS2;
          460.   	if (!(BN_lshift(snum,num,norm_shift))) goto err;
                        ^
          461.   	snum->neg=0;
          462.   

crypto/bn/bn_shift.c:132:1: <LHS trace>
130.   	}
131.   
132. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
133.   	{
134.   	int i,nw,lb,rb;

crypto/bn/bn_shift.c:132:1: Parameter `a->top`
            130.   	}
            131.   
            132. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
            133.   	{
            134.   	int i,nw,lb,rb;

crypto/bn/bn_shift.c:150:8: Binary operation: ([0, +oo] - 1):unsigned64 by call to `BN_mod_exp` 
            148.   	t[a->top+nw]=0;
            149.   	if (lb == 0)
            150.   		for (i=a->top-1; i>=0; i--)
                          ^
            151.   			t[nw+i]=f[i];
            152.   	else
