crypto/dh/dh_gen.c:85: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_set_word`.
Showing all 16 steps of the trace


crypto/dh/dh_gen.c:69:10: Call
67.           goto err;
68.       BN_CTX_start(ctx);
69.       t1 = BN_CTX_get(ctx);
               ^
70.       t2 = BN_CTX_get(ctx);
71.       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:394:15: Assignment
    392.       a->neg = 0;
    393.       a->d[0] = w;
    394.       a->top = (w ? 1 : 0);
                         ^
    395.       bn_check_top(a);
    396.       return 1;

crypto/bn/bn_lib.c:394:5: Assignment
    392.       a->neg = 0;
    393.       a->d[0] = w;
    394.       a->top = (w ? 1 : 0);
               ^
    395.       bn_check_top(a);
    396.       return 1;

crypto/dh/dh_gen.c:85:14: Call
83.       }
84.       if (generator == DH_GENERATOR_2) {
85.           if (!BN_set_word(t1, 24))
                   ^
86.               goto err;
87.           if (!BN_set_word(t2, 11))

crypto/bn/bn_lib.c:387:1: Parameter `*a->d`
  385.   }
  386.   
  387. > int BN_set_word(BIGNUM *a, BN_ULONG w)
  388.   {
  389.       bn_check_top(a);

crypto/bn/bn_lib.c:390:9: Call
  388.   {
  389.       bn_check_top(a);
  390.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                 ^
  391.           return 0;
  392.       a->neg = 0;

crypto/bn/bn_lcl.h:651:1: Parameter `*a->d`
    649.                            const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx);
    650.   
    651. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
    652.   {
    653.       if (bits > (INT_MAX - BN_BITS2 + 1))

crypto/bn/bn_lcl.h:659:12: Call
    657.           return a;
    658.   
    659.       return bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2);
                      ^
    660.   }
    661.   

crypto/bn/bn_lib.c:273:1: Parameter `*b->d`
      271.    */
      272.   
      273. > BIGNUM *bn_expand2(BIGNUM *b, int words)
      274.   {
      275.       bn_check_top(b);

crypto/bn/bn_lib.c:278:23: Call
      276.   
      277.       if (words > b->dmax) {
      278.           BN_ULONG *a = bn_expand_internal(b, words);
                                   ^
      279.           if (!a)
      280.               return NULL;

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

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

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

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

crypto/bn/bn_lib.c:260:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_set_word` 
        258.       assert(b->top <= words);
        259.       if (b->top > 0)
        260.           memcpy(a, b->d, sizeof(*a) * b->top);
                       ^
        261.   
        262.       return a;
