crypto/bn/bn_mont.c:481: error: BUFFER_OVERRUN_L1
  Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: 2 by call to `BN_mod_inverse`.
Showing all 13 steps of the trace


crypto/bn/bn_mont.c:415:1: Array declaration
413.   	}
414.   
415. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
416.   	{
417.   	int ret = 0;

crypto/bn/bn_mont.c:432:3: Assignment
430.   
431.   		BN_init(&tmod);
432.   		tmod.d=buf;
         ^
433.   		tmod.dmax=2;
434.   		tmod.neg=0;

crypto/bn/bn_mont.c:481:8: Call
479.   		tmod.top = buf[0] != 0 ? 1 : 0;
480.   							/* Ri = R^-1 mod N*/
481.   		if ((BN_mod_inverse(Ri,R,&tmod,ctx)) == NULL)
              ^
482.   			goto err;
483.   		if (!BN_lshift(Ri,Ri,BN_BITS2)) goto err; /* R*Ri */

crypto/bn/bn_gcd.c:209:1: Parameter `*n->d`
  207.           const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
  208.   
  209. > BIGNUM *BN_mod_inverse(BIGNUM *in,
  210.   	const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
  211.   	{

crypto/bn/bn_gcd.c:214:7: Call
  212.   	BIGNUM *rv;
  213.   	int noinv;
  214.   	rv = int_bn_mod_inverse(in, a, n, ctx, &noinv);
               ^
  215.   	if (noinv)
  216.   		BNerr(BN_F_BN_MOD_INVERSE,BN_R_NO_INVERSE);

crypto/bn/bn_gcd.c:220:1: Parameter `*n->d`
    218.   	}
    219.   
    220. > BIGNUM *int_bn_mod_inverse(BIGNUM *in,
    221.   	const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx, int *pnoinv)
    222.   	{

crypto/bn/bn_gcd.c:232:10: Call
    230.   	if ((BN_get_flags(a, BN_FLG_CONSTTIME) != 0) || (BN_get_flags(n, BN_FLG_CONSTTIME) != 0))
    231.   		{
    232.   		return BN_mod_inverse_no_branch(in, a, n, ctx);
                    ^
    233.   		}
    234.   

crypto/bn/bn_gcd.c:522:1: Parameter `*n->d`
      520.    * It does not contain branches that may leak sensitive information.
      521.    */
      522. > static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
      523.   	const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
      524.   	{

crypto/bn/bn_gcd.c:553:6: Call
      551.   	BN_zero(Y);
      552.   	if (BN_copy(B,a) == NULL) goto err;
      553.   	if (BN_copy(A,n) == NULL) goto err;
                  ^
      554.   	A->neg = 0;
      555.   

crypto/bn/bn_lib.c:480:1: <Length trace>
478.   	}
479.   
480. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
481.   	{
482.   	int i;

crypto/bn/bn_lib.c:480:1: Parameter `*b->d`
        478.   	}
        479.   
        480. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
        481.   	{
        482.   	int i;

crypto/bn/bn_lib.c:493:2: Assignment
        491.   #if 1
        492.   	A=a->d;
        493.   	B=b->d;
                ^
        494.   	for (i=b->top>>2; i>0; i--,A+=4,B+=4)
        495.   		{

crypto/bn/bn_lib.c:497:33: Array access: Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: 2 by call to `BN_mod_inverse` 
        495.   		{
        496.   		BN_ULONG a0,a1,a2,a3;
        497.   		a0=B[0]; a1=B[1]; a2=B[2]; a3=B[3];
                                               ^
        498.   		A[0]=a0; A[1]=a1; A[2]=a2; A[3]=a3;
        499.   		}
