test/exptest.c:67: error: BUFFER_OVERRUN_L3
  Offset: [4, +oo] (⇐ [0, +oo] + 4) Size: [0, 8388607] by call to `BN_mod_exp`.
Showing all 20 steps of the trace


test/exptest.c:60:5: Call
58.           goto err;
59.   
60.       BN_one(m);
          ^
61.       BN_one(a);
62.       BN_zero(p);

crypto/bn/bn_lib.c:359:1: Parameter `*a->d`
  357.   }
  358.   
  359. > int BN_set_word(BIGNUM *a, BN_ULONG w)
  360.   {
  361.       bn_check_top(a);

crypto/bn/bn_lib.c:362:9: Call
  360.   {
  361.       bn_check_top(a);
  362.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  363.           return 0;
  364.       a->neg = 0;

crypto/bn/bn_lcl.h:660:1: Parameter `*a->d`
    658.                            const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx);
    659.   
    660. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
    661.   {
    662.       if (bits > (INT_MAX - BN_BITS2 + 1))

test/exptest.c:67:10: Call
65.           goto err;
66.   
67.       if (!TEST_true(BN_mod_exp(r, a, p, m, ctx)))
               ^
68.           goto err;
69.   

crypto/bn/bn_exp.c:89:1: Parameter `*a->d`
  87.   }
  88.   
  89. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
  90.                  BN_CTX *ctx)
  91.   {

crypto/bn/bn_exp.c:144:19: Call
  142.           } else
  143.   # endif
  144.               ret = BN_mod_exp_mont(r, a, p, m, ctx, NULL);
                           ^
  145.       } else
  146.   #endif

crypto/bn/bn_exp.c:296:1: Parameter `*a->d`
    294.   }
    295.   
    296. > int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
    297.                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
    298.   {

crypto/bn/bn_exp.c:359:10: Call
    357.       } else
    358.           aa = a;
    359.       if (!bn_to_mont_fixed_top(val[0], aa, mont, ctx))
                    ^
    360.           goto err;               /* 1 */
    361.   

crypto/bn/bn_mont.c:210:1: Parameter `*a->d`
      208.   }
      209.   
      210. > int bn_to_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
      211.                            BN_CTX *ctx)
      212.   {

crypto/bn/bn_mont.c:213:12: Call
      211.                            BN_CTX *ctx)
      212.   {
      213.       return bn_mul_mont_fixed_top(r, a, &(mont->RR), mont, ctx);
                        ^
      214.   }
      215.   

crypto/bn/bn_mont.c:37:1: Parameter `*a->d`
        35.   }
        36.   
        37. > int bn_mul_mont_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
        38.                             BN_MONT_CTX *mont, BN_CTX *ctx)
        39.   {

crypto/bn/bn_mont.c:70:14: Call
        68.               goto err;
        69.       } else {
        70.           if (!BN_mul(tmp, a, b, ctx))
                           ^
        71.               goto err;
        72.       }

crypto/bn/bn_mul.c:497:1: Parameter `*a->d`
          495.   #endif                          /* BN_RECURSION */
          496.   
          497. > int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
          498.   {
          499.       int ret = 0;

crypto/bn/bn_mul.c:577:17: Call
          575.                   if (bn_wexpand(rr, k * 4) == NULL)
          576.                       goto err;
          577.                   bn_mul_part_recursive(rr->d, a->d, b->d,
                                 ^
          578.                                         j, al - j, bl - j, t->d);
          579.               } else {            /* al <= j || bl <= j */

crypto/bn/bn_mul.c:322:1: Parameter `*a`
            320.    */
            321.   /* tnX may not be negative but less than n */
            322. > void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n,
            323.                              int tna, int tnb, BN_ULONG *t)
            324.   {

crypto/bn/bn_mul.c:330:9: Call
            328.   
            329.       if (n < 8) {
            330.           bn_mul_normal(r, a, n + tna, b, n + tnb);
                           ^
            331.           return;
            332.       }

crypto/bn/bn_mul.c:612:1: <Length trace>
610.   }
611.   
612. > void bn_mul_normal(BN_ULONG *r, BN_ULONG *a, int na, BN_ULONG *b, int nb)
613.   {
614.       BN_ULONG *rr;

crypto/bn/bn_mul.c:612:1: Parameter `*b`
              610.   }
              611.   
              612. > void bn_mul_normal(BN_ULONG *r, BN_ULONG *a, int na, BN_ULONG *b, int nb)
              613.   {
              614.       BN_ULONG *rr;

crypto/bn/bn_mul.c:647:50: Array access: Offset: [4, +oo] (⇐ [0, +oo] + 4) Size: [0, 8388607] by call to `BN_mod_exp` 
              645.           if (--nb <= 0)
              646.               return;
              647.           rr[4] = bn_mul_add_words(&(r[4]), a, na, b[4]);
                                                                      ^
              648.           rr += 4;
              649.           r += 4;
