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


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

crypto/bn/bn_ctx.c:283:5: Call
  281.       }
  282.       /* OK, make sure the returned bignum is "zero" */
  283.       BN_zero(ret);
             ^
  284.       ctx->used++;
  285.       CTXDBG_RET(ctx, ret);

crypto/bn/bn_lib.c:520:1: Parameter `*a->d`
    518.   }
    519.   
    520. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    521.   {
    522.       bn_check_top(a);

crypto/dh/dh_check.c:165:14: Call
163.       if (dh->q != NULL) {
164.           /* Check pub_key^q == 1 mod p */
165.           if (!BN_mod_exp(tmp, pub_key, dh->q, dh->p, ctx))
                    ^
166.               goto err;
167.           if (!BN_is_one(tmp))

crypto/bn/bn_exp.c:190:1: Parameter `*r->d`
  188.   }
  189.   
  190. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
  191.                  BN_CTX *ctx)
  192.   {

crypto/bn/bn_exp.c:247:19: Call
  245.               && (BN_get_flags(p, BN_FLG_CONSTTIME) == 0)) {
  246.               BN_ULONG A = a->d[0];
  247.               ret = BN_mod_exp_mont_word(r, A, p, m, ctx, NULL);
                           ^
  248.           } else
  249.   # endif

crypto/bn/bn_exp.c:1151:1: Parameter `*rr->d`
    1149.   }
    1150.   
    1151. > int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p,
    1152.                            const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
    1153.   {

crypto/bn/bn_exp.c:1198:13: Call
    1196.           if (BN_is_one(m)) {
    1197.               ret = 1;
    1198.               BN_zero(rr);
                        ^
    1199.           } else {
    1200.               ret = BN_one(rr);

crypto/bn/bn_lib.c:520:1: Parameter `*a->d`
      518.   }
      519.   
      520. > int BN_set_word(BIGNUM *a, BN_ULONG w)
      521.   {
      522.       bn_check_top(a);

crypto/bn/bn_lib.c:523:9: Call
      521.   {
      522.       bn_check_top(a);
      523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                     ^
      524.           return (0);
      525.       a->neg = 0;

crypto/bn/bn_lib.c:380:1: Parameter `*b->d`
        378.    */
        379.   
        380. > BIGNUM *bn_expand2(BIGNUM *b, int words)
        381.   {
        382.       bn_check_top(b);

crypto/bn/bn_lib.c:385:23: Call
        383.   
        384.       if (words > b->dmax) {
        385.           BN_ULONG *a = bn_expand_internal(b, words);
                                     ^
        386.           if (!a)
        387.               return NULL;

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

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

crypto/bn/bn_lib.c:325:5: Assignment
          323.   
          324.   #if 1
          325.       B = b->d;
                     ^
          326.       /* Check if the previous number needs to be copied */
          327.       if (B != NULL) {

crypto/bn/bn_lib.c:342:18: Array access: Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: [0, 8388607] by call to `BN_mod_exp` 
          340.               a1 = B[1];
          341.               a2 = B[2];
          342.               a3 = B[3];
                                  ^
          343.               A[0] = a0;
          344.               A[1] = a1;
