crypto/bn/bn_mont.c:428: 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:352:1: Array declaration
350.   }
351.   
352. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
353.   {
354.       int ret = 0;

crypto/bn/bn_mont.c:371:9: Assignment
369.   
370.           BN_init(&tmod);
371.           tmod.d = buf;
               ^
372.           tmod.dmax = 2;
373.           tmod.neg = 0;

crypto/bn/bn_mont.c:428:14: Call
426.           tmod.top = buf[0] != 0 ? 1 : 0;
427.           /* Ri = R^-1 mod N */
428.           if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
                    ^
429.               goto err;
430.           if (!BN_lshift(Ri, Ri, BN_BITS2))

crypto/bn/bn_gcd.c:226:1: Parameter `*n->d`
  224.                                           BN_CTX *ctx);
  225.   
  226. > BIGNUM *BN_mod_inverse(BIGNUM *in,
  227.                          const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
  228.   {

crypto/bn/bn_gcd.c:231:10: Call
  229.       BIGNUM *rv;
  230.       int noinv;
  231.       rv = int_bn_mod_inverse(in, a, n, ctx, &noinv);
                  ^
  232.       if (noinv)
  233.           BNerr(BN_F_BN_MOD_INVERSE, BN_R_NO_INVERSE);

crypto/bn/bn_gcd.c:237:1: Parameter `*n->d`
    235.   }
    236.   
    237. > BIGNUM *int_bn_mod_inverse(BIGNUM *in,
    238.                              const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx,
    239.                              int *pnoinv)

crypto/bn/bn_gcd.c:250:16: Call
    248.       if ((BN_get_flags(a, BN_FLG_CONSTTIME) != 0)
    249.           || (BN_get_flags(n, BN_FLG_CONSTTIME) != 0)) {
    250.           return BN_mod_inverse_no_branch(in, a, n, ctx);
                          ^
    251.       }
    252.   

crypto/bn/bn_gcd.c:557:1: Parameter `*n->d`
      555.    * not contain branches that may leak sensitive information.
      556.    */
      557. > static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
      558.                                           const BIGNUM *a, const BIGNUM *n,
      559.                                           BN_CTX *ctx)

crypto/bn/bn_gcd.c:592:9: Call
      590.       if (BN_copy(B, a) == NULL)
      591.           goto err;
      592.       if (BN_copy(A, n) == NULL)
                     ^
      593.           goto err;
      594.       A->neg = 0;

crypto/bn/bn_lib.c:433:1: <Length trace>
431.   }
432.   
433. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
434.   {
435.       int i;

crypto/bn/bn_lib.c:433:1: Parameter `*b->d`
        431.   }
        432.   
        433. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
        434.   {
        435.       int i;

crypto/bn/bn_lib.c:448:5: Assignment
        446.   #if 1
        447.       A = a->d;
        448.       B = b->d;
                   ^
        449.       for (i = b->top >> 2; i > 0; i--, A += 4, B += 4) {
        450.           BN_ULONG a0, a1, a2, a3;

crypto/bn/bn_lib.c:454:14: Array access: Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: 2 by call to `BN_mod_inverse` 
        452.           a1 = B[1];
        453.           a2 = B[2];
        454.           a3 = B[3];
                            ^
        455.           A[0] = a0;
        456.           A[1] = a1;
