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


crypto/bn/bn_mont.c:324:20: Assignment
322.           buf[0] = mod->d[0];     /* tmod = N mod word size */
323.           buf[1] = 0;
324.           tmod.top = buf[0] != 0 ? 1 : 0;
                          ^
325.           /* Ri = R^-1 mod N */
326.           if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)

crypto/bn/bn_mont.c:324:9: Assignment
322.           buf[0] = mod->d[0];     /* tmod = N mod word size */
323.           buf[1] = 0;
324.           tmod.top = buf[0] != 0 ? 1 : 0;
               ^
325.           /* Ri = R^-1 mod N */
326.           if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)

crypto/bn/bn_mont.c:326:14: Call
324.           tmod.top = buf[0] != 0 ? 1 : 0;
325.           /* Ri = R^-1 mod N */
326.           if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
                    ^
327.               goto err;
328.           if (!BN_lshift(Ri, Ri, BN_BITS2))

crypto/bn/bn_gcd.c:124:1: Parameter `n->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 `n->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:455:1: Parameter `n->top`
      453.    * not contain branches that may leak sensitive information.
      454.    */
      455. > static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
      456.                                           const BIGNUM *a, const BIGNUM *n,
      457.                                           BN_CTX *ctx)

crypto/bn/bn_gcd.c:488:9: Call
      486.       if (BN_copy(B, a) == NULL)
      487.           goto err;
      488.       if (BN_copy(A, n) == NULL)
                     ^
      489.           goto err;
      490.       A->neg = 0;

crypto/bn/bn_lib.c:322:1: <Offset trace>
320.   }
321.   
322. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
323.   {
324.       bn_check_top(b);

crypto/bn/bn_lib.c:322:1: Parameter `b->top`
        320.   }
        321.   
        322. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
        323.   {
        324.       bn_check_top(b);

crypto/bn/bn_lib.c:322:1: <Length trace>
320.   }
321.   
322. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
323.   {
324.       bn_check_top(b);

crypto/bn/bn_lib.c:322:1: Parameter `*a->d`
        320.   }
        321.   
        322. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
        323.   {
        324.       bn_check_top(b);

crypto/bn/bn_lib.c:328:9: Call
        326.       if (a == b)
        327.           return a;
        328.       if (bn_wexpand(a, b->top) == NULL)
                       ^
        329.           return NULL;
        330.   

crypto/bn/bn_lib.c:946:1: Parameter `*a->d`
          944.   }
          945.   
          946. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
          947.   {
          948.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:331:5: Array access: Offset added: [0, 8] Size: [0, 536870848] by call to `BN_mod_inverse` 
        329.           return NULL;
        330.   
        331.       memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                   ^
        332.   
        333.       a->top = b->top;
