crypto/rsa/rsa_ossl.c:663: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] (⇐ [0, +oo] + [1, +oo]) Size: [0, 8388607] by call to `bn_from_mont_fixed_top`.
Showing all 12 steps of the trace


crypto/rsa/rsa_ossl.c:592:1: Parameter `rsa->_method_mod_q->N.top`
590.   }
591.   
592. > static int rsa_ossl_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx)
593.   {
594.       BIGNUM *r1, *m1, *vrfy, *r2, *m[RSA_MAX_PRIME_NUM - 2];

crypto/rsa/rsa_ossl.c:663:14: Call
661.            */
662.           if (/* m1 = I moq q */
663.               !bn_from_mont_fixed_top(m1, I, rsa->_method_mod_q, ctx)
                    ^
664.               || !bn_to_mont_fixed_top(m1, m1, rsa->_method_mod_q, ctx)
665.               /* m1 = m1^dmq1 mod q */

crypto/bn/bn_mont.c:174:1: Parameter `mont->N.top`
  172.   }
  173.   
  174. > int bn_from_mont_fixed_top(BIGNUM *ret, const BIGNUM *a, BN_MONT_CTX *mont,
  175.                              BN_CTX *ctx)
  176.   {

crypto/bn/bn_mont.c:183:16: Call
  181.       BN_CTX_start(ctx);
  182.       if ((t = BN_CTX_get(ctx)) && BN_copy(t, a)) {
  183.           retn = bn_from_montgomery_word(ret, t, mont);
                        ^
  184.       }
  185.       BN_CTX_end(ctx);

crypto/bn/bn_mont.c:125:21: <Offset trace>
123.        * includes |carry| which is stored separately.
124.        */
125.       for (carry = 0, i = 0; i < nl; i++, rp++) {
                           ^
126.           v = bn_mul_add_words(rp, np, nl, (rp[0] * n0) & BN_MASK2);
127.           v = (v + carry + rp[nl]) & BN_MASK2;

crypto/bn/bn_mont.c:125:21: Assignment
    123.        * includes |carry| which is stored separately.
    124.        */
    125.       for (carry = 0, i = 0; i < nl; i++, rp++) {
                               ^
    126.           v = bn_mul_add_words(rp, np, nl, (rp[0] * n0) & BN_MASK2);
    127.           v = (v + carry + rp[nl]) & BN_MASK2;

crypto/bn/bn_mont.c:88:1: <Length trace>
86.   
87.   #ifdef MONT_WORD
88. > static int bn_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont)
89.   {
90.       BIGNUM *n;

crypto/bn/bn_mont.c:88:1: Parameter `*r->d`
    86.   
    87.   #ifdef MONT_WORD
    88. > static int bn_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont)
    89.   {
    90.       BIGNUM *n;

crypto/bn/bn_mont.c:103:9: Call
    101.   
    102.       max = (2 * nl);             /* carry is stored separately */
    103.       if (bn_wexpand(r, max) == NULL)
                   ^
    104.           return 0;
    105.   

crypto/bn/bn_lib.c:948:1: Parameter `*a->d`
      946.   }
      947.   
      948. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
      949.   {
      950.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_mont.c:108:5: Assignment
    106.       r->neg ^= n->neg;
    107.       np = n->d;
    108.       rp = r->d;
               ^
    109.   
    110.       /* clear the top words of T */

crypto/bn/bn_mont.c:127:26: Array access: Offset: [1, +oo] (⇐ [0, +oo] + [1, +oo]) Size: [0, 8388607] by call to `bn_from_mont_fixed_top` 
    125.       for (carry = 0, i = 0; i < nl; i++, rp++) {
    126.           v = bn_mul_add_words(rp, np, nl, (rp[0] * n0) & BN_MASK2);
    127.           v = (v + carry + rp[nl]) & BN_MASK2;
                                    ^
    128.           carry |= (v != rp[nl]);
    129.           carry &= (v <= rp[nl]);
