crypto/bn/bn_mont.c:321: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_mod_inverse`.
Showing all 20 steps of the trace


crypto/bn/bn_mont.c:233:1: Parameter `mont->RR.top`
231.   }
232.   
233. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
234.   {
235.       int ret = 0;

crypto/bn/bn_mont.c:311:9: Call
309.           mont->n0[1] = (Ri->top > 1) ? Ri->d[1] : 0;
310.   # else
311.           BN_zero(R);
               ^
312.           if (!(BN_set_bit(R, BN_BITS2)))
313.               goto err;           /* R */

crypto/bn/bn_lib.c:367:15: Assignment
  365.       a->neg = 0;
  366.       a->d[0] = w;
  367.       a->top = (w ? 1 : 0);
                       ^
  368.       bn_check_top(a);
  369.       return 1;

crypto/bn/bn_lib.c:367:5: Assignment
  365.       a->neg = 0;
  366.       a->d[0] = w;
  367.       a->top = (w ? 1 : 0);
             ^
  368.       bn_check_top(a);
  369.       return 1;

crypto/bn/bn_mont.c:312:15: Call
310.   # else
311.           BN_zero(R);
312.           if (!(BN_set_bit(R, BN_BITS2)))
                     ^
313.               goto err;           /* R */
314.   

crypto/bn/bn_lib.c:589:1: Parameter `a->top`
  587.   }
  588.   
  589. > int BN_set_bit(BIGNUM *a, int n)
  590.   {
  591.       int i, j, k;

crypto/bn/bn_mont.c:321:19: Call
319.           if (BN_is_one(&tmod))
320.               BN_zero(Ri);
321.           else if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
                         ^
322.               goto err;
323.           if (!BN_lshift(Ri, Ri, BN_BITS2))

crypto/bn/bn_gcd.c:124:1: Parameter `a->top`
  122.                                           BN_CTX *ctx);
  123.   
  124. > BIGNUM *BN_mod_inverse(BIGNUM *in,
  125.                          const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
  126.   {

crypto/bn/bn_gcd.c:129:10: Call
  127.       BIGNUM *rv;
  128.       int noinv;
  129.       rv = int_bn_mod_inverse(in, a, n, ctx, &noinv);
                  ^
  130.       if (noinv)
  131.           BNerr(BN_F_BN_MOD_INVERSE, BN_R_NO_INVERSE);

crypto/bn/bn_gcd.c:135:1: Parameter `a->top`
    133.   }
    134.   
    135. > BIGNUM *int_bn_mod_inverse(BIGNUM *in,
    136.                              const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx,
    137.                              int *pnoinv)

crypto/bn/bn_gcd.c:155:16: Call
    153.       if ((BN_get_flags(a, BN_FLG_CONSTTIME) != 0)
    154.           || (BN_get_flags(n, BN_FLG_CONSTTIME) != 0)) {
    155.           return BN_mod_inverse_no_branch(in, a, n, ctx);
                          ^
    156.       }
    157.   

crypto/bn/bn_gcd.c:458:1: Parameter `a->top`
      456.    * not contain branches that may leak sensitive information.
      457.    */
      458. > static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
      459.                                           const BIGNUM *a, const BIGNUM *n,
      460.                                           BN_CTX *ctx)

crypto/bn/bn_gcd.c:489:9: Call
      487.       BN_one(X);
      488.       BN_zero(Y);
      489.       if (BN_copy(B, a) == NULL)
                     ^
      490.           goto err;
      491.       if (BN_copy(A, n) == NULL)

crypto/bn/bn_lib.c:285:1: <Offset trace>
283.   }
284.   
285. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
286.   {
287.       bn_check_top(b);

crypto/bn/bn_lib.c:285:1: Parameter `b->top`
        283.   }
        284.   
        285. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
        286.   {
        287.       bn_check_top(b);

crypto/bn/bn_lib.c:285:1: <Length trace>
283.   }
284.   
285. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
286.   {
287.       bn_check_top(b);

crypto/bn/bn_lib.c:285:1: Parameter `*a->d`
        283.   }
        284.   
        285. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
        286.   {
        287.       bn_check_top(b);

crypto/bn/bn_lib.c:291:9: Call
        289.       if (a == b)
        290.           return a;
        291.       if (bn_wexpand(a, b->top) == NULL)
                       ^
        292.           return NULL;
        293.   

crypto/bn/bn_lib.c:941:1: Parameter `*a->d`
          939.   }
          940.   
          941. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
          942.   {
          943.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:295:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_mod_inverse` 
        293.   
        294.       if (b->top > 0)
        295.           memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                       ^
        296.   
        297.       a->top = b->top;
