apps/s_client.c:287: error: BUFFER_OVERRUN_L3
  Offset: [-1, +oo] Size: [1, +oo] by call to `BN_mod_exp`.
Showing all 29 steps of the trace


apps/s_client.c:281:9: Call
279.       int ret =
280.           g != NULL && N != NULL && bn_ctx != NULL && BN_is_odd(N) &&
281.           BN_is_prime_ex(N, SRP_NUMBER_ITERATIONS_FOR_PRIME, bn_ctx, NULL) == 1 &&
               ^
282.           p != NULL && BN_rshift1(p, N) &&
283.           /* p = (N-1)/2 */

crypto/bn/bn_prime.c:145:1: Parameter `ctx_passed->stack.depth`
  143.   }
  144.   
  145. > int BN_is_prime_ex(const BIGNUM *a, int checks, BN_CTX *ctx_passed,
  146.                      BN_GENCB *cb)
  147.   {

crypto/bn/bn_prime.c:148:12: Call
  146.                      BN_GENCB *cb)
  147.   {
  148.       return BN_is_prime_fasttest_ex(a, checks, ctx_passed, 0, cb);
                    ^
  149.   }
  150.   

crypto/bn/bn_prime.c:151:1: Parameter `ctx_passed->stack.depth`
    149.   }
    150.   
    151. > int BN_is_prime_fasttest_ex(const BIGNUM *a, int checks, BN_CTX *ctx_passed,
    152.                               int do_trial_division, BN_GENCB *cb)
    153.   {

apps/s_client.c:287:9: Call
285.           r != NULL &&
286.           /* verify g^((N-1)/2) == -1 (mod N) */
287.           BN_mod_exp(r, g, p, N, bn_ctx) &&
               ^
288.           BN_add_word(r, 1) && BN_cmp(r, N) == 0;
289.   

crypto/bn/bn_exp.c:89:1: Parameter `ctx->stack.depth`
  87.   }
  88.   
  89. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
  90.                  BN_CTX *ctx)
  91.   {

crypto/bn/bn_exp.c:149:15: Call
  147.   #ifdef RECP_MUL_MOD
  148.       {
  149.           ret = BN_mod_exp_recp(r, a, p, m, ctx);
                       ^
  150.       }
  151.   #else

crypto/bn/bn_exp.c:161:1: Parameter `ctx->stack.depth`
    159.   }
    160.   
    161. > int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
    162.                       const BIGNUM *m, BN_CTX *ctx)
    163.   {

crypto/bn/bn_exp.c:191:5: Call
    189.       }
    190.   
    191.       BN_CTX_start(ctx);
               ^
    192.       aa = BN_CTX_get(ctx);
    193.       val[0] = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:181:1: Parameter `ctx->stack.depth`
      179.   }
      180.   
      181. > void BN_CTX_start(BN_CTX *ctx)
      182.   {
      183.       CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/bn/bn_exp.c:210:10: Call
    208.       }
    209.   
    210.       if (!BN_nnmod(val[0], a, m, ctx))
                    ^
    211.           goto err;               /* 1 */
    212.       if (BN_is_zero(val[0])) {

crypto/bn/bn_mod.c:13:1: Parameter `ctx->stack.depth`
      11.   #include "bn_lcl.h"
      12.   
      13. > int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
      14.   {
      15.       /*

crypto/bn/bn_mod.c:20:11: Call
      18.        */
      19.   
      20.       if (!(BN_mod(r, m, d, ctx)))
                      ^
      21.           return 0;
      22.       if (!r->neg)

crypto/bn/bn_div.c:209:1: Parameter `ctx->stack.depth`
        207.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
        208.    */
        209. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
        210.              BN_CTX *ctx)
        211.   {

crypto/bn/bn_exp.c:220:14: Call
    218.       window = BN_window_bits_for_exponent_size(bits);
    219.       if (window > 1) {
    220.           if (!BN_mod_mul_reciprocal(aa, val[0], val[0], &recp, ctx))
                        ^
    221.               goto err;           /* 2 */
    222.           j = 1 << (window - 1);

crypto/bn/bn_recp.c:55:1: Parameter `ctx->stack.depth`
      53.   }
      54.   
      55. > int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
      56.                             BN_RECP_CTX *recp, BN_CTX *ctx)
      57.   {

crypto/bn/bn_recp.c:62:5: Call
      60.       const BIGNUM *ca;
      61.   
      62.       BN_CTX_start(ctx);
                ^
      63.       if ((a = BN_CTX_get(ctx)) == NULL)
      64.           goto err;

crypto/bn/bn_ctx.c:181:1: Parameter `ctx->stack.depth`
        179.   }
        180.   
        181. > void BN_CTX_start(BN_CTX *ctx)
        182.   {
        183.       CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/bn/bn_recp.c:77:11: Call
      75.           ca = x;                 /* Just do the mod */
      76.   
      77.       ret = BN_div_recp(NULL, r, ca, recp, ctx);
                      ^
      78.    err:
      79.       BN_CTX_end(ctx);

crypto/bn/bn_recp.c:90:5: Call
        88.       BIGNUM *a, *b, *d, *r;
        89.   
        90.       BN_CTX_start(ctx);
                  ^
        91.       d = (dv != NULL) ? dv : BN_CTX_get(ctx);
        92.       r = (rem != NULL) ? rem : BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:181:1: Parameter `*ctx->stack.indexes`
          179.   }
          180.   
          181. > void BN_CTX_start(BN_CTX *ctx)
          182.   {
          183.       CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/bn/bn_recp.c:101:13: Call
        99.           BN_zero(d);
        100.           if (!BN_copy(r, m)) {
        101.               BN_CTX_end(ctx);
                           ^
        102.               return 0;
        103.           }

crypto/bn/bn_ctx.c:195:1: Parameter `*ctx->stack.indexes`
          193.   }
          194.   
          195. > void BN_CTX_end(BN_CTX *ctx)
          196.   {
          197.       CTXDBG_ENTRY("BN_CTX_end", ctx);

crypto/bn/bn_ctx.c:201:27: Call
          199.           ctx->err_stack--;
          200.       else {
          201.           unsigned int fp = BN_STACK_pop(&ctx->stack);
                                           ^
          202.           /* Does this stack frame have anything to release? */
          203.           if (fp < ctx->used)

crypto/bn/bn_ctx.c:274:1: <Offset trace>
272.   }
273.   
274. > static unsigned int BN_STACK_pop(BN_STACK *st)
275.   {
276.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:274:1: Parameter `st->depth`
            272.   }
            273.   
            274. > static unsigned int BN_STACK_pop(BN_STACK *st)
            275.   {
            276.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:274:1: <Length trace>
272.   }
273.   
274. > static unsigned int BN_STACK_pop(BN_STACK *st)
275.   {
276.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:274:1: Parameter `*st->indexes`
            272.   }
            273.   
            274. > static unsigned int BN_STACK_pop(BN_STACK *st)
            275.   {
            276.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:276:12: Array access: Offset: [-1, +oo] Size: [1, +oo] by call to `BN_mod_exp` 
            274.   static unsigned int BN_STACK_pop(BN_STACK *st)
            275.   {
            276.       return st->indexes[--(st->depth)];
                              ^
            277.   }
            278.   
