crypto/dsa/dsa_gen.c:542: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_MONT_CTX_set`.
Showing all 17 steps of the trace


crypto/dsa/dsa_gen.c:422:17: Call
420.   
421.               /* step 4 */
422.               r = BN_is_prime_fasttest_ex(q, DSS_prime_checks, ctx,
                       ^
423.                                           seed_in ? 1 : 0, cb);
424.               if (r > 0)

crypto/bn/bn_prime.c:215:10: Call
  213.       if (mont == NULL)
  214.           goto err;
  215.       if (!BN_MONT_CTX_set(mont, a, ctx))
                  ^
  216.           goto err;
  217.   

crypto/bn/bn_mont.c:251:1: Parameter `*mont->N.d`
    249.   }
    250.   
    251. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
    252.   {
    253.       int i, ret = 0;

crypto/dsa/dsa_gen.c:542:10: Call
540.       } else
541.           h = 1;
542.       if (!BN_MONT_CTX_set(mont, p, ctx))
                ^
543.           goto err;
544.   

crypto/bn/bn_mont.c:251:1: Parameter `*mont->N.d`
  249.   }
  250.   
  251. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
  252.   {
  253.       int i, ret = 0;

crypto/bn/bn_mont.c:263:10: Call
  261.           goto err;
  262.       R = &(mont->RR);            /* grab RR as a temp */
  263.       if (!BN_copy(&(mont->N), mod))
                  ^
  264.           goto err;               /* Set N */
  265.       if (BN_get_flags(mod, BN_FLG_CONSTTIME) != 0)

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:949:1: Parameter `*a->d`
      947.   }
      948.   
      949. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
      950.   {
      951.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:951:37: Call
      949.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
      950.   {
      951.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                                 ^
      952.   }
      953.   

crypto/bn/bn_lib.c:245:1: Parameter `*b->d`
        243.    */
        244.   
        245. > BIGNUM *bn_expand2(BIGNUM *b, int words)
        246.   {
        247.       if (words > b->dmax) {

crypto/bn/bn_lib.c:248:23: Call
        246.   {
        247.       if (words > b->dmax) {
        248.           BN_ULONG *a = bn_expand_internal(b, words);
                                     ^
        249.           if (!a)
        250.               return NULL;

crypto/bn/bn_lib.c:209:1: <Offset trace>
207.   /* This is used by bn_expand2() */
208.   /* The caller MUST check that words > b->dmax before calling this */
209. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
210.   {
211.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:209:1: Parameter `b->top`
          207.   /* This is used by bn_expand2() */
          208.   /* The caller MUST check that words > b->dmax before calling this */
          209. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
          210.   {
          211.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:209:1: <Length trace>
207.   /* This is used by bn_expand2() */
208.   /* The caller MUST check that words > b->dmax before calling this */
209. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
210.   {
211.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:209:1: Parameter `*b->d`
          207.   /* This is used by bn_expand2() */
          208.   /* The caller MUST check that words > b->dmax before calling this */
          209. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
          210.   {
          211.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:232:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_MONT_CTX_set` 
          230.       assert(b->top <= words);
          231.       if (b->top > 0)
          232.           memcpy(a, b->d, sizeof(*a) * b->top);
                         ^
          233.   
          234.       return a;
