crypto/bn/bn_rsa_fips186_4.c:215: error: BUFFER_OVERRUN_L3
  Offset: [-1, +oo] Size: [1, +oo] by call to `bn_rsa_fips186_4_derive_prime`.
Showing all 17 steps of the trace


crypto/bn/bn_rsa_fips186_4.c:208:17: Call
206.       /* (Steps 4.2/5.2) - find first auxiliary probable primes */
207.       if (!bn_rsa_fips186_4_find_aux_prob_prime(Xp1i, p1i, ctx, cb)
208.               || !bn_rsa_fips186_4_find_aux_prob_prime(Xp2i, p2i, ctx, cb))
                       ^
209.           goto err;
210.       /* (Table B.1) auxiliary prime Max length check */

crypto/bn/bn_rsa_fips186_4.c:120:1: Parameter `ctx->stack.depth`
  118.    * Returns: 1 on success otherwise it returns 0.
  119.    */
  120. > static int bn_rsa_fips186_4_find_aux_prob_prime(const BIGNUM *Xp1,
  121.                                                   BIGNUM *p1, BN_CTX *ctx,
  122.                                                   BN_GENCB *cb)

crypto/bn/bn_rsa_fips186_4.c:215:10: Call
213.           goto err;
214.       /* (Steps 4.3/5.3) - generate prime */
215.       if (!bn_rsa_fips186_4_derive_prime(p, Xpout, Xp, p1i, p2i, nlen, e, ctx, cb))
                ^
216.           goto err;
217.       ret = 1;

crypto/bn/bn_rsa_fips186_4.c:253:1: Parameter `ctx->stack.depth`
  251.    *     Y, X, r1, r2, e are not NULL.
  252.    */
  253. > int bn_rsa_fips186_4_derive_prime(BIGNUM *Y, BIGNUM *X, const BIGNUM *Xin,
  254.                                     const BIGNUM *r1, const BIGNUM *r2, int nlen,
  255.                                     const BIGNUM *e, BN_CTX *ctx, BN_GENCB *cb)

crypto/bn/bn_rsa_fips186_4.c:265:5: Call
  263.       if (checks == 0)
  264.           return 0;
  265.       BN_CTX_start(ctx);
             ^
  266.   
  267.       R = 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/bn/bn_rsa_fips186_4.c:280:16: Call
  278.       if (!(BN_lshift1(r1x2, r1)
  279.               /* (Step 1) GCD(2r1, r2) = 1 */
  280.               && BN_gcd(tmp, r1x2, r2, ctx)
                        ^
  281.               && BN_is_one(tmp)
  282.               /* (Step 2) R = ((r2^-1 mod 2r1) * r2) - ((2r1^-1 mod r2)*2r1) */

crypto/bn/bn_gcd.c:23:5: Call
    21.       bn_check_top(in_b);
    22.   
    23.       BN_CTX_start(ctx);
              ^
    24.       a = BN_CTX_get(ctx);
    25.       b = 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/bn/bn_gcd.c:49:5: Call
    47.       ret = 1;
    48.    err:
    49.       BN_CTX_end(ctx);
              ^
    50.       bn_check_top(r);
    51.       return ret;

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