crypto/dh/dh_check.c:168: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `BN_mod_exp`.
Showing all 20 steps of the trace


crypto/dh/dh_check.c:156:11: Call
154.           goto err;
155.       BN_CTX_start(ctx);
156.       tmp = BN_CTX_get(ctx);
                 ^
157.       if (tmp == NULL || !BN_set_word(tmp, 1))
158.           goto err;

crypto/bn/bn_ctx.c:229:5: Call
  227.       }
  228.       /* OK, make sure the returned bignum is "zero" */
  229.       BN_zero(ret);
             ^
  230.       ctx->used++;
  231.       CTXDBG_RET(ctx, ret);

crypto/bn/bn_lib.c:398:1: Parameter `*a->d`
    396.   }
    397.   
    398. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    399.   {
    400.       bn_check_top(a);

crypto/bn/bn_lib.c:401:9: Call
    399.   {
    400.       bn_check_top(a);
    401.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    402.           return (0);
    403.       a->neg = 0;

crypto/bn/bn_lcl.h:658:1: Parameter `*a->d`
      656.                            const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx);
      657.   
      658. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
      659.   {
      660.       if (bits > (INT_MAX - BN_BITS2 + 1))

crypto/dh/dh_check.c:168:14: Call
166.       if (dh->q != NULL) {
167.           /* Check pub_key^q == 1 mod p */
168.           if (!BN_mod_exp(tmp, pub_key, dh->q, dh->p, ctx))
                    ^
169.               goto err;
170.           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:141:19: Call
  139.               && (BN_get_flags(m, BN_FLG_CONSTTIME) == 0)) {
  140.               BN_ULONG A = a->d[0];
  141.               ret = BN_mod_exp_mont_word(r, A, p, m, ctx, NULL);
                           ^
  142.           } else
  143.   # endif

crypto/bn/bn_exp.c:1095:1: Parameter `*rr->d`
    1093.   }
    1094.   
    1095. > int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p,
    1096.                            const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
    1097.   {

crypto/bn/bn_exp.c:1230:14: Call
    1228.               goto err;
    1229.       } else {
    1230.           if (!BN_from_montgomery(rr, r, mont, ctx))
                         ^
    1231.               goto err;
    1232.       }

crypto/bn/bn_mont.c:166:1: Parameter `*ret->d`
      164.   #endif                          /* MONT_WORD */
      165.   
      166. > int BN_from_montgomery(BIGNUM *ret, const BIGNUM *a, BN_MONT_CTX *mont,
      167.                          BN_CTX *ctx)
      168.   {

crypto/bn/bn_mont.c:175:16: Call
      173.       BN_CTX_start(ctx);
      174.       if ((t = BN_CTX_get(ctx)) && BN_copy(t, a))
      175.           retn = BN_from_montgomery_word(ret, t, mont);
                            ^
      176.       BN_CTX_end(ctx);
      177.   #else                           /* !MONT_WORD */

crypto/bn/bn_mont.c:135:14: <Offset trace>
133.               (BN_ULONG *)(((PTR_SIZE_INT) rp & ~m) | ((PTR_SIZE_INT) ap & m));
134.   
135.           for (i = 0, nl -= 4; i < nl; i += 4) {
                    ^
136.               BN_ULONG t1, t2, t3, t4;
137.   

crypto/bn/bn_mont.c:135:14: Assignment
        133.               (BN_ULONG *)(((PTR_SIZE_INT) rp & ~m) | ((PTR_SIZE_INT) ap & m));
        134.   
        135.           for (i = 0, nl -= 4; i < nl; i += 4) {
                            ^
        136.               BN_ULONG t1, t2, t3, t4;
        137.   

crypto/bn/bn_mont.c:75:1: <Length trace>
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: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:112:9: Call
        110.       }
        111.   
        112.       if (bn_wexpand(ret, nl) == NULL)
                       ^
        113.           return (0);
        114.       ret->top = nl;

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

crypto/bn/bn_mont.c:117:5: Assignment
        115.       ret->neg = r->neg;
        116.   
        117.       rp = ret->d;
                   ^
        118.       ap = &(r->d[nl]);
        119.   

crypto/bn/bn_mont.c:146:13: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `BN_mod_exp` 
        144.               rp[i + 0] = t1;
        145.               ap[i + 2] = 0;
        146.               rp[i + 1] = t2;
                           ^
        147.               ap[i + 3] = 0;
        148.               rp[i + 2] = t3;
