test/rsa_mp_test.c:205: error: BUFFER_OVERRUN_L3
  Offset: [16, +oo] (⇐ 1 + [15, +oo]) Size: [0, 8388607] by call to `RSA_check_key_ex`.
Showing all 20 steps of the trace


test/rsa_mp_test.c:201:12: Call
199.       if (!TEST_ptr(key))
200.           goto err;
201.       clen = key2048p3(key);
                  ^
202.       if (!TEST_int_eq(clen, 256))
203.           goto err;

test/rsa_mp_test.c:136:10: Call
  134.       int rv = 256; /* public key length */
  135.   
  136.       if (!TEST_int_eq(RSA_set0_key(key,
                  ^
  137.                                     BN_bin2bn(n, sizeof(n) - 1, NULL),
  138.                                     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:205:10: Call
203.           goto err;
204.   
205.       if (!TEST_true(RSA_check_key_ex(key, NULL)))
                ^
206.           goto err;
207.   

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:144:10: Call
  142.           goto err;
  143.       }
  144.       if (!BN_mod_mul(i, key->d, key->e, k, ctx)) {
                  ^
  145.           ret = -1;
  146.           goto err;

crypto/bn/bn_mod.c:73:1: Parameter `a->top`
    71.   
    72.   /* slow but works */
    73. > int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
    74.                  BN_CTX *ctx)
    75.   {

crypto/bn/bn_mod.c:87:14: Call
    85.           goto err;
    86.       if (a == b) {
    87.           if (!BN_sqr(t, a, ctx))
                       ^
    88.               goto err;
    89.       } else {

crypto/bn/bn_sqr.c:17:1: Parameter `a->top`
      15.    * I've just gone over this and it is now %20 faster on x86 - eay - 27 Jun 96
      16.    */
      17. > int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
      18.   {
      19.       int max, al;

crypto/bn/bn_sqr.c:25:5: Assignment
      23.       bn_check_top(a);
      24.   
      25.       al = a->top;
                ^
      26.       if (al <= 0) {
      27.           r->top = 0;

crypto/bn/bn_sqr.c:74:17: Call
      72.                   if (bn_wexpand(tmp, max) == NULL)
      73.                       goto err;
      74.                   bn_sqr_normal(rr->d, a->d, al, tmp->d);
                            ^
      75.               }
      76.           }

crypto/bn/bn_sqr.c:105:1: <Offset trace>
103.   
104.   /* tmp must have 2*n words */
105. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
106.   {
107.       int i, j, max;

crypto/bn/bn_sqr.c:105:1: Parameter `n`
        103.   
        104.   /* tmp must have 2*n words */
        105. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
        106.   {
        107.       int i, j, max;

crypto/bn/bn_sqr.c:116:5: Assignment
        114.       rp[0] = rp[max - 1] = 0;
        115.       rp++;
        116.       j = n;
                   ^
        117.   
        118.       if (--j > 0) {

crypto/bn/bn_sqr.c:118:9: Assignment
        116.       j = n;
        117.   
        118.       if (--j > 0) {
                       ^
        119.           ap++;
        120.           rp[j] = bn_mul_words(rp, ap, j, ap[-1]);

crypto/bn/bn_sqr.c:105:1: <Length trace>
103.   
104.   /* tmp must have 2*n words */
105. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
106.   {
107.       int i, j, max;

crypto/bn/bn_sqr.c:105:1: Parameter `*r`
        103.   
        104.   /* tmp must have 2*n words */
        105. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
        106.   {
        107.       int i, j, max;

crypto/bn/bn_sqr.c:113:5: Assignment
        111.       max = n * 2;
        112.       ap = a;
        113.       rp = r;
                   ^
        114.       rp[0] = rp[max - 1] = 0;
        115.       rp++;

crypto/bn/bn_sqr.c:115:5: Assignment
        113.       rp = r;
        114.       rp[0] = rp[max - 1] = 0;
        115.       rp++;
                   ^
        116.       j = n;
        117.   

crypto/bn/bn_sqr.c:120:9: Array access: Offset: [16, +oo] (⇐ 1 + [15, +oo]) Size: [0, 8388607] by call to `RSA_check_key_ex` 
        118.       if (--j > 0) {
        119.           ap++;
        120.           rp[j] = bn_mul_words(rp, ap, j, ap[-1]);
                       ^
        121.           rp += 2;
        122.       }
