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


test/bntest.c:1063:5: Call
1061.       e = BN_new();
1062.   
1063.       BN_one(a);
            ^
1064.       BN_one(b);
1065.       BN_zero(c);

crypto/bn/bn_lib.c:530:1: Parameter `a->top`
  528.   }
  529.   
  530. > int BN_set_word(BIGNUM *a, BN_ULONG w)
  531.   {
  532.       bn_check_top(a);

test/bntest.c:1066:9: Call
1064.       BN_one(b);
1065.       BN_zero(c);
1066.       if (BN_mod_exp_mont_consttime(d, a, b, c, ctx, NULL)) {
                ^
1067.           fprintf(stderr, "BN_mod_exp_mont_consttime with zero modulus "
1068.                   "succeeded\n");

crypto/bn/bn_exp.c:655:1: Parameter `a->top`
  653.    * http://www.daemonology.net/hyperthreading-considered-harmful/)
  654.    */
  655. > int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
  656.                                 const BIGNUM *m, BN_CTX *ctx,
  657.                                 BN_MONT_CTX *in_mont)

crypto/bn/bn_exp.c:808:14: Call
  806.       /* prepare a^1 in Montgomery domain */
  807.       if (a->neg || BN_ucmp(a, m) >= 0) {
  808.           if (!BN_mod(&am, a, m, ctx))
                      ^
  809.               goto err;
  810.           if (!BN_to_montgomery(&am, &am, mont, ctx))

crypto/bn/bn_div.c:189:1: Parameter `num->top`
    187.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
    188.    */
    189. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
    190.              BN_CTX *ctx)
    191.   {

crypto/bn/bn_div.c:259:11: Call
    257.       sdiv->neg = 0;
    258.       norm_shift += BN_BITS2;
    259.       if (!(BN_lshift(snum, num, norm_shift)))
                     ^
    260.           goto err;
    261.       snum->neg = 0;

crypto/bn/bn_shift.c:130:1: <Offset trace>
128.   }
129.   
130. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
131.   {
132.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:130:1: Parameter `n`
      128.   }
      129.   
      130. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
      131.   {
      132.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:145:5: Assignment
      143.   
      144.       r->neg = a->neg;
      145.       nw = n / BN_BITS2;
                 ^
      146.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
      147.           return (0);

crypto/bn/bn_shift.c:130:1: <Length trace>
128.   }
129.   
130. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
131.   {
132.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:130:1: Parameter `*r->d`
      128.   }
      129.   
      130. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
      131.   {
      132.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:146:9: Call
      144.       r->neg = a->neg;
      145.       nw = n / BN_BITS2;
      146.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
                     ^
      147.           return (0);
      148.       lb = n % BN_BITS2;

crypto/bn/bn_lib.c:995:1: Parameter `*a->d`
        993.   }
        994.   
        995. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
        996.   {
        997.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_shift.c:151:5: Assignment
      149.       rb = BN_BITS2 - lb;
      150.       f = a->d;
      151.       t = r->d;
                 ^
      152.       t[a->top + nw] = 0;
      153.       if (lb == 0)

crypto/bn/bn_shift.c:159:13: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `BN_mod_exp_mont_consttime` 
      157.           for (i = a->top - 1; i >= 0; i--) {
      158.               l = f[i];
      159.               t[nw + i + 1] |= (l >> rb) & BN_MASK2;
                         ^
      160.               t[nw + i] = (l << lb) & BN_MASK2;
      161.           }
