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


crypto/ec/ecp_smpl.c:1214:11: Call
1212.   
1213.       BN_CTX_start(ctx);
1214.       tmp = BN_CTX_get(ctx);
                  ^
1215.       tmp_Z = BN_CTX_get(ctx);
1216.       if (tmp_Z == 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: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/ec/ecp_smpl.c:1263:10: Call
1261.        */
1262.   
1263.       if (!BN_mod_inverse(tmp, prod_Z[num - 1], group->field, ctx)) {
                 ^
1264.           ECerr(EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE, ERR_R_BN_LIB);
1265.           goto err;

crypto/bn/bn_gcd.c:124:1: Parameter `*in->d`
  122.                                           BN_CTX *ctx);
  123.   
  124. > BIGNUM *BN_mod_inverse(BIGNUM *in,
  125.                          const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
  126.   {

crypto/bn/bn_gcd.c:129:10: Call
  127.       BIGNUM *rv;
  128.       int noinv;
  129.       rv = int_bn_mod_inverse(in, a, n, ctx, &noinv);
                  ^
  130.       if (noinv)
  131.           BNerr(BN_F_BN_MOD_INVERSE, BN_R_NO_INVERSE);

crypto/bn/bn_gcd.c:135:1: Parameter `*in->d`
    133.   }
    134.   
    135. > BIGNUM *int_bn_mod_inverse(BIGNUM *in,
    136.                              const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx,
    137.                              int *pnoinv)

crypto/bn/bn_gcd.c:148:16: Call
    146.       if ((BN_get_flags(a, BN_FLG_CONSTTIME) != 0)
    147.           || (BN_get_flags(n, BN_FLG_CONSTTIME) != 0)) {
    148.           return BN_mod_inverse_no_branch(in, a, n, ctx);
                          ^
    149.       }
    150.   

crypto/bn/bn_gcd.c:451:1: Parameter `*in->d`
      449.    * not contain branches that may leak sensitive information.
      450.    */
      451. > static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
      452.                                           const BIGNUM *a, const BIGNUM *n,
      453.                                           BN_CTX *ctx)

crypto/bn/bn_gcd.c:602:18: Call
      600.                   goto err;
      601.           } else {
      602.               if (!BN_nnmod(R, Y, n, ctx))
                              ^
      603.                   goto err;
      604.           }

crypto/bn/bn_mod.c:13:1: Parameter `*r->d`
        11.   #include "bn_lcl.h"
        12.   
        13. > int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
        14.   {
        15.       /*

crypto/bn/bn_mod.c:20:11: Call
        18.        */
        19.   
        20.       if (!(BN_mod(r, m, d, ctx)))
                        ^
        21.           return 0;
        22.       if (!r->neg)

crypto/bn/bn_div.c:137:1: Parameter `*rm->d`
          135.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
          136.    */
          137. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
          138.              BN_CTX *ctx)
          139.   {

crypto/bn/bn_div.c:403:9: Call
          401.            */
          402.           int neg = num->neg;
          403.           BN_rshift(rm, snum, norm_shift);
                         ^
          404.           if (!BN_is_zero(rm))
          405.               rm->neg = neg;

crypto/bn/bn_shift.c:122:1: Parameter `*r->d`
            120.   }
            121.   
            122. > int BN_rshift(BIGNUM *r, const BIGNUM *a, int n)
            123.   {
            124.       int i, j, nw, lb, rb;

crypto/bn/bn_shift.c:140:9: Call
            138.       lb = BN_BITS2 - rb;
            139.       if (nw >= a->top || a->top == 0) {
            140.           BN_zero(r);
                           ^
            141.           return 1;
            142.       }

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

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_lib.c:393:5: Array access: Offset: 0 Size: [0, 8388607] by call to `BN_mod_inverse` 
              391.           return 0;
              392.       a->neg = 0;
              393.       a->d[0] = w;
                         ^
              394.       a->top = (w ? 1 : 0);
              395.       bn_check_top(a);
