test/bntest.c:624: error: BUFFER_OVERRUN_L3
  Offset: [-1, +oo] Size: [1, +oo] by call to `BN_GF2m_mod_inv`.
Showing all 19 steps of the trace


test/bntest.c:624:13: Call
622.           BN_bntest_rand(a, 512, 0, 0);
623.           for (j = 0; j < 2; j++) {
624.               BN_GF2m_mod_inv(c, a, b[j], ctx);
                   ^
625.               BN_GF2m_mod_mul(d, a, c, b[j], ctx);
626.               /* Test that ((1/a)*a) = 1. */

crypto/bn/bn_gf2m.c:560:1: Parameter `ctx->stack.depth`
  558.    * Curve Cryptography Over Binary Fields".
  559.    */
  560. > int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
  561.   {
  562.       BIGNUM *b, *c = NULL, *u = NULL, *v = NULL, *tmp;

crypto/bn/bn_gf2m.c:568:5: Call
  566.       bn_check_top(p);
  567.   
  568.       BN_CTX_start(ctx);
             ^
  569.   
  570.       if ((b = BN_CTX_get(ctx)) == NULL)

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_gf2m.c:724:5: Call
  722.       bn_correct_top(v);
  723.   # endif
  724.       BN_CTX_end(ctx);
             ^
  725.       return ret;
  726.   }

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

test/bntest.c:625:13: Call
623.           for (j = 0; j < 2; j++) {
624.               BN_GF2m_mod_inv(c, a, b[j], ctx);
625.               BN_GF2m_mod_mul(d, a, c, b[j], ctx);
                   ^
626.               /* Test that ((1/a)*a) = 1. */
627.               if (!TEST_BN_eq_one(d))

crypto/bn/bn_gf2m.c:473:1: Parameter `ctx->stack.depth`
  471.    * BN_GF2m_mod_mul_arr function.
  472.    */
  473. > int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
  474.                       const BIGNUM *p, BN_CTX *ctx)
  475.   {

test/bntest.c:624:13: Call
622.           BN_bntest_rand(a, 512, 0, 0);
623.           for (j = 0; j < 2; j++) {
624.               BN_GF2m_mod_inv(c, a, b[j], ctx);
                   ^
625.               BN_GF2m_mod_mul(d, a, c, b[j], ctx);
626.               /* Test that ((1/a)*a) = 1. */

crypto/bn/bn_gf2m.c:568:5: Call
  566.       bn_check_top(p);
  567.   
  568.       BN_CTX_start(ctx);
             ^
  569.   
  570.       if ((b = BN_CTX_get(ctx)) == NULL)

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_gf2m.c:724:5: Call
  722.       bn_correct_top(v);
  723.   # endif
  724.       BN_CTX_end(ctx);
             ^
  725.       return ret;
  726.   }

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:271:1: <Offset trace>
269.   }
270.   
271. > static unsigned int BN_STACK_pop(BN_STACK *st)
272.   {
273.       return st->indexes[--(st->depth)];

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

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

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

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