crypto/rsa/rsa_sp800_56b_check.c:133: error: BUFFER_OVERRUN_L3
  Offset: [-1, +oo] Size: [1, +oo] by call to `rsa_check_prime_factor_range`.
Showing all 13 steps of the trace


crypto/rsa/rsa_sp800_56b_check.c:131:9: Call
129.   
130.       /* (Steps 5 a-b) prime test */
131.       if (BN_is_prime_fasttest_ex(p, checks, ctx, 1, NULL) != 1
               ^
132.               /* (Step 5c) (√2)(2^(nbits/2 - 1) <= p <= 2^(nbits/2 - 1) */
133.               || rsa_check_prime_factor_range(p, nbits, ctx) != 1)

crypto/bn/bn_prime.c:186:1: Parameter `ctx_passed->stack.depth`
  184.   
  185.   /* See FIPS 186-4 C.3.1 Miller Rabin Probabilistic Primality Test. */
  186. > int BN_is_prime_fasttest_ex(const BIGNUM *w, int checks, BN_CTX *ctx_passed,
  187.                               int do_trial_division, BN_GENCB *cb)
  188.   {

crypto/rsa/rsa_sp800_56b_check.c:133:16: Call
131.       if (BN_is_prime_fasttest_ex(p, checks, ctx, 1, NULL) != 1
132.               /* (Step 5c) (√2)(2^(nbits/2 - 1) <= p <= 2^(nbits/2 - 1) */
133.               || rsa_check_prime_factor_range(p, nbits, ctx) != 1)
                      ^
134.           return 0;
135.   

crypto/rsa/rsa_sp800_56b_check.c:95:5: Call
  93.           return 0;
  94.   
  95.       BN_CTX_start(ctx);
            ^
  96.       tmp = BN_CTX_get(ctx);
  97.       low = BN_CTX_get(ctx);

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/rsa/rsa_sp800_56b_check.c:113:5: Call
  111.       ret = 1;
  112.   err:
  113.       BN_CTX_end(ctx);
             ^
  114.       return ret;
  115.   }

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 `rsa_check_prime_factor_range` 
      268.   static unsigned int BN_STACK_pop(BN_STACK *st)
      269.   {
      270.       return st->indexes[--(st->depth)];
                        ^
      271.   }
      272.   
