crypto/rsa/rsa_ossl.c:679: error: BUFFER_OVERRUN_L3
  Offset: [-1, +oo] Size: [1, +oo] by call to `bn_to_mont_fixed_top`.
Showing all 40 steps of the trace


crypto/rsa/rsa_ossl.c:587:1: Parameter `ctx->stack.depth`
585.   }
586.   
587. > static int rsa_ossl_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx)
588.   {
589.       BIGNUM *r1, *m1, *vrfy, *r2, *m[RSA_MAX_PRIME_NUM - 2];

crypto/rsa/rsa_ossl.c:593:5: Call
591.       RSA_PRIME_INFO *pinfo;
592.   
593.       BN_CTX_start(ctx);
           ^
594.   
595.       r1 = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:171:1: Parameter `ctx->stack.depth`
  169.   }
  170.   
  171. > void BN_CTX_start(BN_CTX *ctx)
  172.   {
  173.       CTXDBG("ENTER BN_CTX_start()", ctx);

crypto/rsa/rsa_ossl.c:658:14: Call
656.            */
657.           if (/* m1 = I moq q */
658.               !bn_from_mont_fixed_top(m1, I, rsa->_method_mod_q, ctx)
                    ^
659.               || !bn_to_mont_fixed_top(m1, m1, rsa->_method_mod_q, ctx)
660.               /* m1 = m1^dmq1 mod q */

crypto/bn/bn_mont.c:174:1: Parameter `ctx->stack.depth`
  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:181:5: Call
  179.       BIGNUM *t;
  180.   
  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);

crypto/bn/bn_ctx.c:171:1: Parameter `ctx->stack.depth`
    169.   }
    170.   
    171. > void BN_CTX_start(BN_CTX *ctx)
    172.   {
    173.       CTXDBG("ENTER BN_CTX_start()", ctx);

crypto/bn/bn_mont.c:185:5: Call
  183.           retn = bn_from_montgomery_word(ret, t, mont);
  184.       }
  185.       BN_CTX_end(ctx);
             ^
  186.   #else                           /* !MONT_WORD */
  187.       BIGNUM *t1, *t2;

crypto/bn/bn_ctx.c:185:1: Parameter `ctx->stack.depth`
    183.   }
    184.   
    185. > void BN_CTX_end(BN_CTX *ctx)
    186.   {
    187.       if (ctx == NULL)

crypto/rsa/rsa_ossl.c:659:17: Call
657.           if (/* m1 = I moq q */
658.               !bn_from_mont_fixed_top(m1, I, rsa->_method_mod_q, ctx)
659.               || !bn_to_mont_fixed_top(m1, m1, rsa->_method_mod_q, ctx)
                       ^
660.               /* m1 = m1^dmq1 mod q */
661.               || !BN_mod_exp_mont_consttime(m1, m1, rsa->dmq1, rsa->q, ctx,

crypto/bn/bn_mont.c:222:1: Parameter `ctx->stack.depth`
  220.   }
  221.   
  222. > int bn_to_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
  223.                            BN_CTX *ctx)
  224.   {

crypto/bn/bn_mont.c:225:12: Call
  223.                            BN_CTX *ctx)
  224.   {
  225.       return bn_mul_mont_fixed_top(r, a, &(mont->RR), mont, ctx);
                    ^
  226.   }
  227.   

crypto/bn/bn_mont.c:37:1: Parameter `ctx->stack.depth`
    35.   }
    36.   
    37. > int bn_mul_mont_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
    38.                             BN_MONT_CTX *mont, BN_CTX *ctx)
    39.   {

crypto/rsa/rsa_ossl.c:661:17: Call
659.               || !bn_to_mont_fixed_top(m1, m1, rsa->_method_mod_q, ctx)
660.               /* m1 = m1^dmq1 mod q */
661.               || !BN_mod_exp_mont_consttime(m1, m1, rsa->dmq1, rsa->q, ctx,
                       ^
662.                                             rsa->_method_mod_q)
663.               /* r1 = I mod p */

crypto/bn/bn_exp.c:592:1: Parameter `ctx->stack.depth`
  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/rsa/rsa_ossl.c:664:17: Call
662.                                             rsa->_method_mod_q)
663.               /* r1 = I mod p */
664.               || !bn_from_mont_fixed_top(r1, I, rsa->_method_mod_p, ctx)
                       ^
665.               || !bn_to_mont_fixed_top(r1, r1, rsa->_method_mod_p, ctx)
666.               /* r1 = r1^dmp1 mod p */

crypto/bn/bn_mont.c:174:1: Parameter `ctx->stack.depth`
  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:181:5: Call
  179.       BIGNUM *t;
  180.   
  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);

crypto/bn/bn_ctx.c:171:1: Parameter `ctx->stack.depth`
    169.   }
    170.   
    171. > void BN_CTX_start(BN_CTX *ctx)
    172.   {
    173.       CTXDBG("ENTER BN_CTX_start()", ctx);

crypto/bn/bn_mont.c:185:5: Call
  183.           retn = bn_from_montgomery_word(ret, t, mont);
  184.       }
  185.       BN_CTX_end(ctx);
             ^
  186.   #else                           /* !MONT_WORD */
  187.       BIGNUM *t1, *t2;

crypto/bn/bn_ctx.c:185:1: Parameter `ctx->stack.depth`
    183.   }
    184.   
    185. > void BN_CTX_end(BN_CTX *ctx)
    186.   {
    187.       if (ctx == NULL)

crypto/rsa/rsa_ossl.c:665:17: Call
663.               /* r1 = I mod p */
664.               || !bn_from_mont_fixed_top(r1, I, rsa->_method_mod_p, ctx)
665.               || !bn_to_mont_fixed_top(r1, r1, rsa->_method_mod_p, ctx)
                       ^
666.               /* r1 = r1^dmp1 mod p */
667.               || !BN_mod_exp_mont_consttime(r1, r1, rsa->dmp1, rsa->p, ctx,

crypto/bn/bn_mont.c:222:1: Parameter `ctx->stack.depth`
  220.   }
  221.   
  222. > int bn_to_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
  223.                            BN_CTX *ctx)
  224.   {

crypto/bn/bn_mont.c:225:12: Call
  223.                            BN_CTX *ctx)
  224.   {
  225.       return bn_mul_mont_fixed_top(r, a, &(mont->RR), mont, ctx);
                    ^
  226.   }
  227.   

crypto/bn/bn_mont.c:37:1: Parameter `ctx->stack.depth`
    35.   }
    36.   
    37. > int bn_mul_mont_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
    38.                             BN_MONT_CTX *mont, BN_CTX *ctx)
    39.   {

crypto/rsa/rsa_ossl.c:667:17: Call
665.               || !bn_to_mont_fixed_top(r1, r1, rsa->_method_mod_p, ctx)
666.               /* r1 = r1^dmp1 mod p */
667.               || !BN_mod_exp_mont_consttime(r1, r1, rsa->dmp1, rsa->p, ctx,
                       ^
668.                                             rsa->_method_mod_p)
669.               /* r1 = (r1 - m1) mod p */

crypto/bn/bn_exp.c:592:1: Parameter `ctx->stack.depth`
  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/rsa/rsa_ossl.c:679:17: Call
677.   
678.               /* r1 = r1 * iqmp mod p */
679.               || !bn_to_mont_fixed_top(r1, r1, rsa->_method_mod_p, ctx)
                       ^
680.               || !bn_mul_mont_fixed_top(r1, r1, rsa->iqmp, rsa->_method_mod_p,
681.                                         ctx)

crypto/bn/bn_mont.c:222:1: Parameter `ctx->stack.depth`
  220.   }
  221.   
  222. > int bn_to_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
  223.                            BN_CTX *ctx)
  224.   {

crypto/bn/bn_mont.c:225:12: Call
  223.                            BN_CTX *ctx)
  224.   {
  225.       return bn_mul_mont_fixed_top(r, a, &(mont->RR), mont, ctx);
                    ^
  226.   }
  227.   

crypto/bn/bn_mont.c:60:5: Call
    58.           return 0;
    59.   
    60.       BN_CTX_start(ctx);
              ^
    61.       tmp = BN_CTX_get(ctx);
    62.       if (tmp == NULL)

crypto/bn/bn_ctx.c:171:1: Parameter `*ctx->stack.indexes`
      169.   }
      170.   
      171. > void BN_CTX_start(BN_CTX *ctx)
      172.   {
      173.       CTXDBG("ENTER BN_CTX_start()", ctx);

crypto/bn/bn_mont.c:83:5: Call
    81.       ret = 1;
    82.    err:
    83.       BN_CTX_end(ctx);
              ^
    84.       return ret;
    85.   }

crypto/bn/bn_ctx.c:185:1: Parameter `*ctx->stack.indexes`
      183.   }
      184.   
      185. > void BN_CTX_end(BN_CTX *ctx)
      186.   {
      187.       if (ctx == NULL)

crypto/bn/bn_ctx.c:193:27: Call
      191.           ctx->err_stack--;
      192.       else {
      193.           unsigned int fp = BN_STACK_pop(&ctx->stack);
                                       ^
      194.           /* Does this stack frame have anything to release? */
      195.           if (fp < ctx->used)

crypto/bn/bn_ctx.c:268:1: <Offset trace>
266.   }
267.   
268. > static unsigned int BN_STACK_pop(BN_STACK *st)
269.   {
270.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:268:1: Parameter `st->depth`
        266.   }
        267.   
        268. > static unsigned int BN_STACK_pop(BN_STACK *st)
        269.   {
        270.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:268:1: <Length trace>
266.   }
267.   
268. > static unsigned int BN_STACK_pop(BN_STACK *st)
269.   {
270.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:268:1: Parameter `*st->indexes`
        266.   }
        267.   
        268. > static unsigned int BN_STACK_pop(BN_STACK *st)
        269.   {
        270.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:270:12: Array access: Offset: [-1, +oo] Size: [1, +oo] by call to `bn_to_mont_fixed_top` 
        268.   static unsigned int BN_STACK_pop(BN_STACK *st)
        269.   {
        270.       return st->indexes[--(st->depth)];
                          ^
        271.   }
        272.   
