crypto/ec/ecp_smpl.c:1268: 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:1219:11: Call
1217.   
1218.       BN_CTX_start(ctx);
1219.       tmp = BN_CTX_get(ctx);
                  ^
1220.       tmp_Z = BN_CTX_get(ctx);
1221.       if (tmp == NULL || 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:393:1: Parameter `*a->d`
    391.   }
    392.   
    393. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    394.   {
    395.       bn_check_top(a);

crypto/bn/bn_lib.c:396:9: Call
    394.   {
    395.       bn_check_top(a);
    396.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    397.           return (0);
    398.       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:1268:10: Call
1266.        */
1267.   
1268.       if (!BN_mod_inverse(tmp, prod_Z[num - 1], group->field, ctx)) {
                 ^
1269.           ECerr(EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE, ERR_R_BN_LIB);
1270.           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:455:1: Parameter `*in->d`
      453.    * not contain branches that may leak sensitive information.
      454.    */
      455. > static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
      456.                                           const BIGNUM *a, const BIGNUM *n,
      457.                                           BN_CTX *ctx)

crypto/bn/bn_gcd.c:606:18: Call
      604.                   goto err;
      605.           } else {
      606.               if (!BN_nnmod(R, Y, n, ctx))
                              ^
      607.                   goto err;
      608.           }

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:140:1: Parameter `*rm->d`
          138.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
          139.    */
          140. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
          141.              BN_CTX *ctx)
          142.   {

crypto/bn/bn_div.c:409:9: Call
          407.            */
          408.           int neg = num->neg;
          409.           BN_rshift(rm, snum, norm_shift);
                         ^
          410.           if (!BN_is_zero(rm))
          411.               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:393:1: <Length trace>
391.   }
392.   
393. > int BN_set_word(BIGNUM *a, BN_ULONG w)
394.   {
395.       bn_check_top(a);

crypto/bn/bn_lib.c:393:1: Parameter `*a->d`
              391.   }
              392.   
              393. > int BN_set_word(BIGNUM *a, BN_ULONG w)
              394.   {
              395.       bn_check_top(a);

crypto/bn/bn_lib.c:396:9: Call
              394.   {
              395.       bn_check_top(a);
              396.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                             ^
              397.           return (0);
              398.       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:399:5: Array access: Offset: 0 Size: [0, 8388607] by call to `BN_mod_inverse` 
              397.           return (0);
              398.       a->neg = 0;
              399.       a->d[0] = w;
                         ^
              400.       a->top = (w ? 1 : 0);
              401.       bn_check_top(a);
