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


crypto/dh/dh_check.c:77:10: Call
75.           goto err;
76.       BN_CTX_start(ctx);
77.       t1 = BN_CTX_get(ctx);
               ^
78.       t2 = BN_CTX_get(ctx);
79.       if (t2 == NULL)

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:405:15: Assignment
    403.       a->neg = 0;
    404.       a->d[0] = w;
    405.       a->top = (w ? 1 : 0);
                         ^
    406.       bn_check_top(a);
    407.       return 1;

crypto/bn/bn_lib.c:405:5: Assignment
    403.       a->neg = 0;
    404.       a->d[0] = w;
    405.       a->top = (w ? 1 : 0);
               ^
    406.       bn_check_top(a);
    407.       return 1;

crypto/dh/dh_check.c:89:18: Call
87.           else {
88.               /* Check g^q == 1 mod p */
89.               if (!BN_mod_exp(t1, dh->g, dh->q, dh->p, ctx))
                       ^
90.                   goto err;
91.               if (!BN_is_one(t1))

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

crypto/bn/bn_exp.c:138:19: Call
  136.               && (BN_get_flags(p, BN_FLG_CONSTTIME) == 0)) {
  137.               BN_ULONG A = a->d[0];
  138.               ret = BN_mod_exp_mont_word(r, A, p, m, ctx, NULL);
                           ^
  139.           } else
  140.   # endif

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

crypto/bn/bn_exp.c:1137:19: Call
    1135.               BN_zero(rr);
    1136.           } else {
    1137.               ret = BN_one(rr);
                              ^
    1138.           }
    1139.           return 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/bn/bn_lcl.h:666:12: Call
        664.           return a;
        665.   
        666.       return bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2);
                          ^
        667.   }
        668.   

crypto/bn/bn_lib.c:284:1: Parameter `*b->d`
          282.    */
          283.   
          284. > BIGNUM *bn_expand2(BIGNUM *b, int words)
          285.   {
          286.       bn_check_top(b);

crypto/bn/bn_lib.c:289:23: Call
          287.   
          288.       if (words > b->dmax) {
          289.           BN_ULONG *a = bn_expand_internal(b, words);
                                       ^
          290.           if (!a)
          291.               return NULL;

crypto/bn/bn_lib.c:246:1: <Offset 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 = NULL;

crypto/bn/bn_lib.c:246:1: Parameter `b->top`
            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 = 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 = 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 = NULL;

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