crypto/ec/ecp_smpl.c:852: error: BUFFER_OVERRUN_L3
  Offset: 0 Size: [0, 8388607] by call to `BN_mod_sub_quick`.
Showing all 15 steps of the trace


crypto/ec/ecp_smpl.c:823:10: Call
821.   
822.       BN_CTX_start(ctx);
823.       n0 = BN_CTX_get(ctx);
                ^
824.       n1 = BN_CTX_get(ctx);
825.       n2 = BN_CTX_get(ctx);

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/ec/ecp_smpl.c:852:14: Call
850.           if (!BN_mod_add_quick(n0, a->X, n1, p))
851.               goto err;
852.           if (!BN_mod_sub_quick(n2, a->X, n1, p))
                    ^
853.               goto err;
854.           if (!field_mul(group, n1, n0, n2, ctx))

crypto/bn/bn_mod.c:116:1: Parameter `*r->d`
  114.    * less than m
  115.    */
  116. > int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
  117.                        const BIGNUM *m)
  118.   {

crypto/bn/bn_mod.c:119:10: Call
  117.                        const BIGNUM *m)
  118.   {
  119.       if (!BN_sub(r, a, b))
                  ^
  120.           return 0;
  121.       if (r->neg)

crypto/bn/bn_add.c:45:1: Parameter `*r->d`
    43.   
    44.   /* signed sub of b from a. */
    45. > int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
    46.   {
    47.       int ret, r_neg, cmp_res;

crypto/bn/bn_add.c:65:13: Call
    63.           } else {
    64.               r_neg = 0;
    65.               BN_zero(r);
                      ^
    66.               ret = 1;
    67.           }

crypto/bn/bn_lib.c:359:1: <Length trace>
357.   }
358.   
359. > int BN_set_word(BIGNUM *a, BN_ULONG w)
360.   {
361.       bn_check_top(a);

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_lib.c:365:5: Array access: Offset: 0 Size: [0, 8388607] by call to `BN_mod_sub_quick` 
      363.           return 0;
      364.       a->neg = 0;
      365.       a->d[0] = w;
                 ^
      366.       a->top = (w ? 1 : 0);
      367.       a->flags &= ~BN_FLG_FIXED_TOP;
