test/bntest.c:2044: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `BN_mod_exp`.
Showing all 15 steps of the trace


test/bntest.c:2042:5: Call
2040.               || !TEST_ptr(r = BN_new()))
2041.           goto err;
2042.       BN_zero(zero);
            ^
2043.   
2044.       if (!TEST_true(BN_mod_exp(r, a, zero, BN_value_one(), NULL))

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

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

test/bntest.c:2044:10: Call
2042.       BN_zero(zero);
2043.   
2044.       if (!TEST_true(BN_mod_exp(r, a, zero, BN_value_one(), NULL))
                 ^
2045.               || !TEST_BN_eq_zero(r)
2046.               || !TEST_true(BN_mod_exp_mont(r, a, zero, BN_value_one(),

crypto/bn/bn_exp.c:89:1: Parameter `*p->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 `*p->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:310:16: Call
    308.               || BN_get_flags(a, BN_FLG_CONSTTIME) != 0
    309.               || BN_get_flags(m, BN_FLG_CONSTTIME) != 0) {
    310.           return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
                          ^
    311.       }
    312.   

crypto/bn/bn_exp.c:592:1: Parameter `*p->d`
      590.    * http://www.daemonology.net/hyperthreading-considered-harmful/)
      591.    */
      592. > int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
      593.                                 const BIGNUM *m, BN_CTX *ctx,
      594.                                 BN_MONT_CTX *in_mont)

crypto/bn/bn_exp.c:1057:18: Call
      1055.           wmask = (1 << window0) - 1;
      1056.           bits -= window0;
      1057.           wvalue = bn_get_bits(p, bits) & wmask;
                               ^
      1058.           if (!MOD_EXP_CTIME_COPY_FROM_PREBUF(&tmp, top, powerbuf, wvalue,
      1059.                                               window))

crypto/bn/bn_exp.c:472:1: <Offset trace>
470.   }
471.   
472. > static BN_ULONG bn_get_bits(const BIGNUM *a, int bitpos)
473.   {
474.       BN_ULONG ret = 0;

crypto/bn/bn_exp.c:472:1: Parameter `a->top`
        470.   }
        471.   
        472. > static BN_ULONG bn_get_bits(const BIGNUM *a, int bitpos)
        473.   {
        474.       BN_ULONG ret = 0;

crypto/bn/bn_exp.c:472:1: <Length trace>
470.   }
471.   
472. > static BN_ULONG bn_get_bits(const BIGNUM *a, int bitpos)
473.   {
474.       BN_ULONG ret = 0;

crypto/bn/bn_exp.c:472:1: Parameter `*a->d`
        470.   }
        471.   
        472. > static BN_ULONG bn_get_bits(const BIGNUM *a, int bitpos)
        473.   {
        474.       BN_ULONG ret = 0;

crypto/bn/bn_exp.c:484:24: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `BN_mod_exp` 
        482.               ret >>= bitpos;
        483.               if (++wordpos < a->top)
        484.                   ret |= a->d[wordpos] << (BN_BITS2 - bitpos);
                                      ^
        485.           }
        486.       }
