crypto/bn/bn_recp.c:67: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `BN_sqr`.
Showing all 15 steps of the trace


crypto/bn/bn_recp.c:63:14: Call
61.   
62.       BN_CTX_start(ctx);
63.       if ((a = BN_CTX_get(ctx)) == NULL)
                   ^
64.           goto err;
65.       if (y != NULL) {

crypto/bn/bn_ctx.c:229:5: Call
  227.       }
  228.       /* OK, make sure the returned bignum is "zero" */
  229.       BN_zero(ret);
             ^
  230.       /* clear BN_FLG_CONSTTIME if leaked from previous frames */
  231.       ret->flags &= (~BN_FLG_CONSTTIME);

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_recp.c:67:18: Call
65.       if (y != NULL) {
66.           if (x == y) {
67.               if (!BN_sqr(a, x, ctx))
                       ^
68.                   goto err;
69.           } else {

crypto/bn/bn_sqr.c:19:15: Call
  17.   int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
  18.   {
  19.       int ret = bn_sqr_fixed_top(r, a, ctx);
                      ^
  20.   
  21.       bn_correct_top(r);

crypto/bn/bn_sqr.c:27:1: Parameter `r->top`
    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:21:5: Call
  19.       int ret = bn_sqr_fixed_top(r, a, ctx);
  20.   
  21.       bn_correct_top(r);
            ^
  22.       bn_check_top(r);
  23.   

crypto/bn/bn_lib.c:944:1: <Offset trace>
942.   }
943.   
944. > void bn_correct_top(BIGNUM *a)
945.   {
946.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:944:1: Parameter `a->top`
    942.   }
    943.   
    944. > void bn_correct_top(BIGNUM *a)
    945.   {
    946.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:947:5: Assignment
    945.   {
    946.       BN_ULONG *ftl;
    947.       int tmp_top = a->top;
               ^
    948.   
    949.       if (tmp_top > 0) {

crypto/bn/bn_lib.c:944:1: <Length trace>
942.   }
943.   
944. > void bn_correct_top(BIGNUM *a)
945.   {
946.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:944:1: Parameter `*a->d`
    942.   }
    943.   
    944. > void bn_correct_top(BIGNUM *a)
    945.   {
    946.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:950:14: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `BN_sqr` 
    948.   
    949.       if (tmp_top > 0) {
    950.           for (ftl = &(a->d[tmp_top]); tmp_top > 0; tmp_top--) {
                        ^
    951.               ftl--;
    952.               if (*ftl != 0)
