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


crypto/dh/dh_check.c:37:10: Call
35.           goto err;
36.       BN_CTX_start(ctx);
37.       t1 = BN_CTX_get(ctx);
               ^
38.       if (t1 == NULL)
39.           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:463:1: Parameter `*a->d`
    461.   }
    462.   
    463. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    464.   {
    465.       bn_check_top(a);

crypto/bn/bn_lib.c:466:9: Call
    464.   {
    465.       bn_check_top(a);
    466.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    467.           return (0);
    468.       a->neg = 0;

crypto/bn/bn_lcl.h:676:1: Parameter `*a->d`
      674.   int bn_probable_prime_dh_coprime(BIGNUM *rnd, int bits, BN_CTX *ctx);
      675.   
      676. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
      677.   {
      678.       if (bits > (INT_MAX - BN_BITS2 + 1))

crypto/dh/dh_check.c:51:18: Call
49.           else {
50.               /* Check g^q == 1 mod p */
51.               if (!BN_mod_exp(t1, dh->g, dh->q, dh->p, ctx))
                       ^
52.                   goto err;
53.               if (!BN_is_one(t1))

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

crypto/bn/bn_exp.c:147:19: Call
  145.               && (BN_get_flags(p, BN_FLG_CONSTTIME) == 0)) {
  146.               BN_ULONG A = a->d[0];
  147.               ret = BN_mod_exp_mont_word(r, A, p, m, ctx, NULL);
                           ^
  148.           } else
  149.   # endif

crypto/bn/bn_exp.c:1089:1: Parameter `*rr->d`
    1087.   }
    1088.   
    1089. > int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p,
    1090.                            const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
    1091.   {

crypto/bn/bn_exp.c:1138:19: Call
    1136.               BN_zero(rr);
    1137.           } else {
    1138.               ret = BN_one(rr);
                              ^
    1139.           }
    1140.           return ret;

crypto/bn/bn_lib.c:463:1: Parameter `*a->d`
      461.   }
      462.   
      463. > int BN_set_word(BIGNUM *a, BN_ULONG w)
      464.   {
      465.       bn_check_top(a);

crypto/bn/bn_lib.c:466:9: Call
      464.   {
      465.       bn_check_top(a);
      466.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                     ^
      467.           return (0);
      468.       a->neg = 0;

crypto/bn/bn_lcl.h:676:1: Parameter `*a->d`
        674.   int bn_probable_prime_dh_coprime(BIGNUM *rnd, int bits, BN_CTX *ctx);
        675.   
        676. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
        677.   {
        678.       if (bits > (INT_MAX - BN_BITS2 + 1))

crypto/bn/bn_lcl.h:684:12: Call
        682.           return a;
        683.   
        684.       return bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2);
                          ^
        685.   }
        686.   

crypto/bn/bn_lib.c:323:1: Parameter `*b->d`
          321.    */
          322.   
          323. > BIGNUM *bn_expand2(BIGNUM *b, int words)
          324.   {
          325.       bn_check_top(b);

crypto/bn/bn_lib.c:328:23: Call
          326.   
          327.       if (words > b->dmax) {
          328.           BN_ULONG *a = bn_expand_internal(b, words);
                                       ^
          329.           if (!a)
          330.               return NULL;

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

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

crypto/bn/bn_lib.c:272:5: Assignment
            270.   
            271.   #if 1
            272.       B = b->d;
                       ^
            273.       /* Check if the previous number needs to be copied */
            274.       if (B != NULL) {

crypto/bn/bn_lib.c:289:18: Array access: Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: [0, 8388607] by call to `BN_mod_exp` 
            287.               a1 = B[1];
            288.               a2 = B[2];
            289.               a3 = B[3];
                                    ^
            290.               A[0] = a0;
            291.               A[1] = a1;
