crypto/bn/bn_mont.c:67: error: BUFFER_OVERRUN_L3
  Offset: 0 Size: [0, 8388607] by call to `bn_sqr_fixed_top`.
Showing all 14 steps of the trace


crypto/bn/bn_mont.c:61:11: Call
59.   
60.       BN_CTX_start(ctx);
61.       tmp = BN_CTX_get(ctx);
                ^
62.       if (tmp == NULL)
63.           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:359:1: Parameter `*a->d`
    357.   }
    358.   
    359. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    360.   {
    361.       bn_check_top(a);

crypto/bn/bn_lib.c:362:9: Call
    360.   {
    361.       bn_check_top(a);
    362.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    363.           return 0;
    364.       a->neg = 0;

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

crypto/bn/bn_mont.c:67:14: Call
65.       bn_check_top(tmp);
66.       if (a == b) {
67.           if (!bn_sqr_fixed_top(tmp, a, ctx))
                   ^
68.               goto err;
69.       } else {

crypto/bn/bn_sqr.c:27:1: Parameter `*r->d`
  25.   }
  26.   
  27. > int bn_sqr_fixed_top(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
  28.   {
  29.       int max, al;

crypto/bn/bn_sqr.c:49:9: Call
  47.   
  48.       max = 2 * al;               /* Non-zero (from above) */
  49.       if (bn_wexpand(rr, max) == NULL)
                ^
  50.           goto err;
  51.   

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

crypto/bn/bn_sqr.c:84:17: Call
  82.                   if (bn_wexpand(tmp, max) == NULL)
  83.                       goto err;
  84.                   bn_sqr_normal(rr->d, a->d, al, tmp->d);
                        ^
  85.               }
  86.           }

crypto/bn/bn_sqr.c:109:1: <Length trace>
107.   
108.   /* tmp must have 2*n words */
109. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
110.   {
111.       int i, j, max;

crypto/bn/bn_sqr.c:109:1: Parameter `*r`
    107.   
    108.   /* tmp must have 2*n words */
    109. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
    110.   {
    111.       int i, j, max;

crypto/bn/bn_sqr.c:117:5: Assignment
    115.       max = n * 2;
    116.       ap = a;
    117.       rp = r;
               ^
    118.       rp[0] = rp[max - 1] = 0;
    119.       rp++;

crypto/bn/bn_sqr.c:118:5: Array access: Offset: 0 Size: [0, 8388607] by call to `bn_sqr_fixed_top` 
    116.       ap = a;
    117.       rp = r;
    118.       rp[0] = rp[max - 1] = 0;
               ^
    119.       rp++;
    120.       j = n;
