test/rsa_mp_test.c:345: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `RSA_check_key_ex`.
Showing all 17 steps of the trace


test/rsa_mp_test.c:341:12: Call
339.       if (!TEST_ptr(key))
340.           goto err;
341.       clen = key4096p7(key);
                  ^
342.       if (!TEST_int_eq(clen, 512))
343.           goto err;

test/rsa_mp_test.c:269:10: Call
  267.       memcpy(d + sizeof(d1) - 1, d2, sizeof(d2) - 1);
  268.   
  269.       if (!TEST_int_eq(RSA_set0_key(key,
                  ^
  270.                                     BN_bin2bn(n, len_n, NULL),
  271.                                     BN_bin2bn(e, sizeof(e) - 1, NULL),

crypto/bn/bn_lib.c:399:1: Parameter `ret->top`
    397.   }
    398.   
    399. > BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)
    400.   {
    401.       unsigned int i, m;

test/rsa_mp_test.c:345:10: Call
343.           goto err;
344.   
345.       if (!TEST_true(RSA_check_key_ex(key, NULL)))
                ^
346.           goto err;
347.   

crypto/rsa/rsa_chk.c:19:1: Parameter `key->d->top`
  17.   }
  18.   
  19. > int RSA_check_key_ex(const RSA *key, BN_GENCB *cb)
  20.   {
  21.       BIGNUM *i, *j, *k, *l, *m;

crypto/rsa/rsa_chk.c:157:14: Call
  155.               goto err;
  156.           }
  157.           if (!BN_mod(j, key->d, i, ctx)) {
                      ^
  158.               ret = -1;
  159.               goto err;

crypto/bn/bn_div.c:137:1: Parameter `num->top`
    135.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
    136.    */
    137. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
    138.              BN_CTX *ctx)
    139.   {

crypto/bn/bn_div.c:204:11: Call
    202.       sdiv->neg = 0;
    203.       norm_shift += BN_BITS2;
    204.       if (!(BN_lshift(snum, num, norm_shift)))
                     ^
    205.           goto err;
    206.       snum->neg = 0;

crypto/bn/bn_shift.c:83:1: <Offset trace>
81.   }
82.   
83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
84.   {
85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:83:1: Parameter `n`
      81.   }
      82.   
      83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
      84.   {
      85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:97:5: Assignment
      95.       }
      96.   
      97.       nw = n / BN_BITS2;
                 ^
      98.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
      99.           return 0;

crypto/bn/bn_shift.c:83:1: <Length trace>
81.   }
82.   
83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
84.   {
85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:83:1: Parameter `*r->d`
      81.   }
      82.   
      83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
      84.   {
      85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:98:9: Call
      96.   
      97.       nw = n / BN_BITS2;
      98.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
                     ^
      99.           return 0;
      100.       r->neg = a->neg;

crypto/bn/bn_lib.c:940:1: Parameter `*a->d`
        938.   }
        939.   
        940. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
        941.   {
        942.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_shift.c:104:5: Assignment
      102.       rb = BN_BITS2 - lb;
      103.       f = a->d;
      104.       t = r->d;
                 ^
      105.       t[a->top + nw] = 0;
      106.       if (lb == 0)

crypto/bn/bn_shift.c:112:13: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `RSA_check_key_ex` 
      110.           for (i = a->top - 1; i >= 0; i--) {
      111.               l = f[i];
      112.               t[nw + i + 1] |= (l >> rb) & BN_MASK2;
                         ^
      113.               t[nw + i] = (l << lb) & BN_MASK2;
      114.           }
