crypto/dh/dh_check.c:220: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_mod_exp`.
Showing all 22 steps of the trace


crypto/dh/dh_check.c:213:9: Call
211.       if (BN_cmp(pub_key, tmp) <= 0)
212.           *ret |= DH_CHECK_PUBKEY_TOO_SMALL;
213.       if (BN_copy(tmp, dh->p) == NULL || !BN_sub_word(tmp, 1))
               ^
214.           goto err;
215.       if (BN_cmp(pub_key, tmp) >= 0)

crypto/bn/bn_lib.c:285:1: Parameter `a->top`
  283.   }
  284.   
  285. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
  286.   {
  287.       bn_check_top(b);

crypto/dh/dh_check.c:220:14: Call
218.       if (dh->q != NULL) {
219.           /* Check pub_key^q == 1 mod p */
220.           if (!BN_mod_exp(tmp, pub_key, dh->q, dh->p, ctx))
                    ^
221.               goto err;
222.           if (!BN_is_one(tmp))

crypto/bn/bn_exp.c:89:1: Parameter `*r->d`
  87.   }
  88.   
  89. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
  90.                  BN_CTX *ctx)
  91.   {

crypto/bn/bn_exp.c:144:19: Call
  142.           } else
  143.   # endif
  144.               ret = BN_mod_exp_mont(r, a, p, m, ctx, NULL);
                           ^
  145.       } else
  146.   #endif

crypto/bn/bn_exp.c:296:1: Parameter `*rr->d`
    294.   }
    295.   
    296. > int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
    297.                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
    298.   {

crypto/bn/bn_exp.c:310:16: Call
    308.               || BN_get_flags(a, BN_FLG_CONSTTIME) != 0
    309.               || BN_get_flags(m, BN_FLG_CONSTTIME) != 0) {
    310.           return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
                          ^
    311.       }
    312.   

crypto/bn/bn_exp.c:598:1: Parameter `*rr->d`
      596.    * http://www.daemonology.net/hyperthreading-considered-harmful/)
      597.    */
      598. > int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
      599.                                 const BIGNUM *m, BN_CTX *ctx,
      600.                                 BN_MONT_CTX *in_mont)

crypto/bn/bn_exp.c:1087:10: Call
      1085.       } else
      1086.   #endif
      1087.       if (!BN_from_montgomery(rr, &tmp, mont, ctx))
                       ^
      1088.           goto err;
      1089.       ret = 1;

crypto/bn/bn_mont.c:151:1: Parameter `*ret->d`
        149.   #endif                          /* MONT_WORD */
        150.   
        151. > int BN_from_montgomery(BIGNUM *ret, const BIGNUM *a, BN_MONT_CTX *mont,
        152.                          BN_CTX *ctx)
        153.   {

crypto/bn/bn_mont.c:160:16: Call
        158.       BN_CTX_start(ctx);
        159.       if ((t = BN_CTX_get(ctx)) && BN_copy(t, a))
        160.           retn = BN_from_montgomery_word(ret, t, mont);
                              ^
        161.       BN_CTX_end(ctx);
        162.   #else                           /* !MONT_WORD */

crypto/bn/bn_mont.c:75:1: Parameter `*ret->d`
          73.   
          74.   #ifdef MONT_WORD
          75. > static int BN_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont)
          76.   {
          77.       BIGNUM *n;

crypto/bn/bn_mont.c:119:9: Call
          117.       }
          118.   
          119.       if (bn_wexpand(ret, nl) == NULL)
                         ^
          120.           return 0;
          121.       ret->top = nl;

crypto/bn/bn_lib.c:941:1: Parameter `*a->d`
            939.   }
            940.   
            941. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
            942.   {
            943.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:943:37: Call
            941.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
            942.   {
            943.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                                       ^
            944.   }
            945.   

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

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

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

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

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

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

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