crypto/bn/bn_mont.c:331: 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:247:1: Parameter `mont->RR.top`
245.   }
246.   
247. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
248.   {
249.       int ret = 0;

crypto/bn/bn_mont.c:323:9: Call
321.           mont->n0[1] = (Ri->top > 1) ? Ri->d[1] : 0;
322.   # else
323.           BN_zero(R);
               ^
324.           if (!(BN_set_bit(R, BN_BITS2)))
325.               goto err;           /* R */

crypto/bn/bn_lib.c:391:15: Assignment
  389.       a->neg = 0;
  390.       a->d[0] = w;
  391.       a->top = (w ? 1 : 0);
                       ^
  392.       bn_check_top(a);
  393.       return 1;

crypto/bn/bn_lib.c:391:5: Assignment
  389.       a->neg = 0;
  390.       a->d[0] = w;
  391.       a->top = (w ? 1 : 0);
             ^
  392.       bn_check_top(a);
  393.       return 1;

crypto/bn/bn_mont.c:324:15: Call
322.   # else
323.           BN_zero(R);
324.           if (!(BN_set_bit(R, BN_BITS2)))
                     ^
325.               goto err;           /* R */
326.   

crypto/bn/bn_lib.c:613:1: Parameter `a->top`
  611.   }
  612.   
  613. > int BN_set_bit(BIGNUM *a, int n)
  614.   {
  615.       int i, j, k;

crypto/bn/bn_mont.c:331:14: Call
329.           tmod.top = buf[0] != 0 ? 1 : 0;
330.           /* Ri = R^-1 mod N */
331.           if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
                    ^
332.               goto err;
333.           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:148:16: Call
    146.       if ((BN_get_flags(a, BN_FLG_CONSTTIME) != 0)
    147.           || (BN_get_flags(n, BN_FLG_CONSTTIME) != 0)) {
    148.           return BN_mod_inverse_no_branch(in, a, n, ctx);
                          ^
    149.       }
    150.   

crypto/bn/bn_gcd.c:451:1: Parameter `a->top`
      449.    * not contain branches that may leak sensitive information.
      450.    */
      451. > static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
      452.                                           const BIGNUM *a, const BIGNUM *n,
      453.                                           BN_CTX *ctx)

crypto/bn/bn_gcd.c:482:9: Call
      480.       BN_one(X);
      481.       BN_zero(Y);
      482.       if (BN_copy(B, a) == NULL)
                     ^
      483.           goto err;
      484.       if (BN_copy(A, n) == NULL)

crypto/bn/bn_lib.c:312:1: <Offset trace>
310.   }
311.   
312. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
313.   {
314.       bn_check_top(b);

crypto/bn/bn_lib.c:312:1: Parameter `b->top`
        310.   }
        311.   
        312. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
        313.   {
        314.       bn_check_top(b);

crypto/bn/bn_lib.c:312:1: <Length trace>
310.   }
311.   
312. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
313.   {
314.       bn_check_top(b);

crypto/bn/bn_lib.c:312:1: Parameter `*a->d`
        310.   }
        311.   
        312. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
        313.   {
        314.       bn_check_top(b);

crypto/bn/bn_lib.c:318:9: Call
        316.       if (a == b)
        317.           return a;
        318.       if (bn_wexpand(a, b->top) == NULL)
                       ^
        319.           return NULL;
        320.   

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

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