crypto/rsa/rsa_sp800_56b_gen.c:97: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `bn_rsa_fips186_4_gen_prob_primes`.
Showing all 22 steps of the trace


crypto/rsa/rsa_sp800_56b_gen.c:51:1: Parameter `e->top`
49.    *     (Required for CAVS testing).
50.    */
51. > int rsa_fips186_4_gen_prob_primes(RSA *rsa, BIGNUM *p1, BIGNUM *p2,
52.                                     BIGNUM *Xpout, const BIGNUM *Xp,
53.                                     const BIGNUM *Xp1, const BIGNUM *Xp2,

crypto/rsa/rsa_sp800_56b_gen.c:71:10: Call
69.       }
70.   
71.       if (!rsa_check_public_exponent(e)) {
               ^
72.           RSAerr(RSA_F_RSA_FIPS186_4_GEN_PROB_PRIMES,
73.                  RSA_R_PUB_EXPONENT_OUT_OF_RANGE);

crypto/rsa/rsa_sp800_56b_check.c:191:1: Parameter `e->top`
  189.   
  190.   /* Check exponent is odd, and has a bitlen ranging from [17..256] */
  191. > int rsa_check_public_exponent(const BIGNUM *e)
  192.   {
  193.       int bitlen = BN_num_bits(e);

crypto/rsa/rsa_sp800_56b_check.c:193:18: Call
  191.   int rsa_check_public_exponent(const BIGNUM *e)
  192.   {
  193.       int bitlen = BN_num_bits(e);
                          ^
  194.   
  195.       return (BN_is_odd(e) &&  bitlen > 16 && bitlen < 257);

crypto/bn/bn_lib.c:140:9: Call
    138.       bn_check_top(a);
    139.   
    140.       if (BN_is_zero(a))
                   ^
    141.           return 0;
    142.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));

crypto/bn/bn_lib.c:866:1: Parameter `a->top`
      864.   }
      865.   
      866. > int BN_is_zero(const BIGNUM *a)
      867.   {
      868.       return a->top == 0;

crypto/rsa/rsa_sp800_56b_check.c:195:13: Call
  193.       int bitlen = BN_num_bits(e);
  194.   
  195.       return (BN_is_odd(e) &&  bitlen > 16 && bitlen < 257);
                     ^
  196.   }
  197.   

crypto/bn/bn_lib.c:881:1: Parameter `a->top`
    879.   }
    880.   
    881. > int BN_is_odd(const BIGNUM *a)
    882.   {
    883.       return (a->top > 0) && (a->d[0] & 1);

crypto/rsa/rsa_sp800_56b_gen.c:97:10: Call
95.   
96.       /* (Step 4) Generate p, Xp */
97.       if (!bn_rsa_fips186_4_gen_prob_primes(rsa->p, Xpo, p1, p2, Xp, Xp1, Xp2,
                ^
98.                                             nbits, e, ctx, cb))
99.           goto err;

crypto/bn/bn_rsa_fips186_4.c:167:1: Parameter `e->top`
  165.    * Returns: 1 on success otherwise it returns 0.
  166.    */
  167. > int bn_rsa_fips186_4_gen_prob_primes(BIGNUM *p, BIGNUM *Xpout,
  168.                                        BIGNUM *p1, BIGNUM *p2,
  169.                                        const BIGNUM *Xp, const BIGNUM *Xp1,

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 `e->top`
    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:329:25: Call
    327.               if (BN_copy(y1, Y) == NULL
    328.                       || !BN_sub_word(y1, 1)
    329.                       || !BN_gcd(tmp, y1, e, ctx))
                                   ^
    330.                   goto err;
    331.               if (BN_is_one(tmp)

crypto/bn/bn_gcd.c:15:1: Parameter `in_b->top`
      13.   static BIGNUM *euclid(BIGNUM *a, BIGNUM *b);
      14.   
      15. > int BN_gcd(BIGNUM *r, const BIGNUM *in_a, const BIGNUM *in_b, BN_CTX *ctx)
      16.   {
      17.       BIGNUM *a, *b, *t;

crypto/bn/bn_gcd.c:31:9: Call
      29.       if (BN_copy(a, in_a) == NULL)
      30.           goto err;
      31.       if (BN_copy(b, in_b) == NULL)
                    ^
      32.           goto err;
      33.       a->neg = 0;

crypto/bn/bn_lib.c:281:1: <Offset trace>
279.   }
280.   
281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
282.   {
283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: Parameter `b->top`
        279.   }
        280.   
        281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
        282.   {
        283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: <Length trace>
279.   }
280.   
281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
282.   {
283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: Parameter `*a->d`
        279.   }
        280.   
        281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
        282.   {
        283.       bn_check_top(b);

crypto/bn/bn_lib.c:287:9: Call
        285.       if (a == b)
        286.           return a;
        287.       if (bn_wexpand(a, b->top) == NULL)
                       ^
        288.           return NULL;
        289.   

crypto/bn/bn_lib.c:962:1: Parameter `*a->d`
          960.   }
          961.   
          962. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
          963.   {
          964.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:291:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `bn_rsa_fips186_4_gen_prob_primes` 
        289.   
        290.       if (b->top > 0)
        291.           memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                       ^
        292.   
        293.       a->neg = b->neg;
