crypto/sm2/sm2_crypt.c:178: error: BUFFER_OVERRUN_L3
  Offset: [10, +oo] Size: [0, 8388607] by call to `EC_POINT_mul`.
Showing all 19 steps of the trace


crypto/sm2/sm2_crypt.c:173:10: Call
171.       memset(ciphertext_buf, 0, *ciphertext_len);
172.   
173.       if (!BN_priv_rand_range(k, order)) {
                ^
174.           SM2err(SM2_F_SM2_ENCRYPT, ERR_R_INTERNAL_ERROR);
175.           goto done;

crypto/bn/bn_rand.c:182:1: Parameter `range->top`
  180.   }
  181.   
  182. > int BN_priv_rand_range(BIGNUM *r, const BIGNUM *range)
  183.   {
  184.       return bnrand_range(PRIVATE, r, range);

crypto/bn/bn_rand.c:184:12: Call
  182.   int BN_priv_rand_range(BIGNUM *r, const BIGNUM *range)
  183.   {
  184.       return bnrand_range(PRIVATE, r, range);
                    ^
  185.   }
  186.   

crypto/bn/bn_rand.c:113:1: Parameter `range->top`
    111.   
    112.   /* random number r:  0 <= r < range */
    113. > static int bnrand_range(BNRAND_FLAG flag, BIGNUM *r, const BIGNUM *range)
    114.   {
    115.       int n;

crypto/sm2/sm2_crypt.c:178:10: Call
176.       }
177.   
178.       if (!EC_POINT_mul(group, kG, k, NULL, NULL, ctx)
                ^
179.               || !EC_POINT_get_affine_coordinates_GFp(group, kG, x1, y1, ctx)
180.               || !EC_POINT_mul(group, kP, NULL, P, k, ctx)

crypto/ec/ec_lib.c:956:1: Parameter `group->field->top`
  954.   }
  955.   
  956. > int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar,
  957.                    const EC_POINT *point, const BIGNUM *p_scalar, BN_CTX *ctx)
  958.   {

crypto/ec/ec_lib.c:967:12: Call
  965.       scalars[0] = p_scalar;
  966.   
  967.       return EC_POINTs_mul(group, r, g_scalar,
                    ^
  968.                            (point != NULL
  969.                             && p_scalar != NULL), points, scalars, ctx);

crypto/ec/ec_lib.c:918:1: Parameter `group->field->top`
    916.    */
    917.   
    918. > int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
    919.                     size_t num, const EC_POINT *points[],
    920.                     const BIGNUM *scalars[], BN_CTX *ctx)

crypto/ec/ec_lib.c:950:15: Call
    948.       else
    949.           /* use default */
    950.           ret = ec_wNAF_mul(group, r, scalar, num, points, scalars, ctx);
                         ^
    951.   
    952.       BN_CTX_free(new_ctx);

crypto/ec/ec_mult.c:410:1: Parameter `group->field->top`
      408.    * in the addition if scalar != NULL
      409.    */
      410. > int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
      411.                   size_t num, const EC_POINT *points[], const BIGNUM *scalars[],
      412.                   BN_CTX *ctx)

crypto/ec/ec_mult.c:453:20: Call
      451.                * always call the ladder version.
      452.                */
      453.               return ec_scalar_mul_ladder(group, r, scalar, NULL, ctx);
                                ^
      454.           }
      455.           if ((scalar == NULL) && (num == 1)) {

crypto/ec/ec_mult.c:253:13: Call
        251.           || (bn_wexpand(s->Y, group_top) == NULL)
        252.           || (bn_wexpand(s->Z, group_top) == NULL)
        253.           || (bn_wexpand(r->X, group_top) == NULL)
                           ^
        254.           || (bn_wexpand(r->Y, group_top) == NULL)
        255.           || (bn_wexpand(r->Z, group_top) == NULL)

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

crypto/ec/ec_mult.c:354:9: Call
        352.       for (i = cardinality_bits - 1; i >= 0; i--) {
        353.           kbit = BN_is_bit_set(k, i) ^ pbit;
        354.           EC_POINT_CSWAP(kbit, r, s, group_top, Z_is_one);
                       ^
        355.   
        356.           /* Perform a single step of the Montgomery ladder */

crypto/bn/bn_lib.c:734:1: <Offset trace>
732.    * a and b cannot be the same number
733.    */
734. > void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords)
735.   {
736.       BN_ULONG t;

crypto/bn/bn_lib.c:734:1: Parameter `nwords`
          732.    * a and b cannot be the same number
          733.    */
          734. > void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords)
          735.   {
          736.       BN_ULONG t;

crypto/bn/bn_lib.c:734:1: <Length trace>
732.    * a and b cannot be the same number
733.    */
734. > void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords)
735.   {
736.       BN_ULONG t;

crypto/bn/bn_lib.c:734:1: Parameter `*a->d`
          732.    * a and b cannot be the same number
          733.    */
          734. > void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords)
          735.   {
          736.       BN_ULONG t;

crypto/bn/bn_lib.c:790:13: Array access: Offset: [10, +oo] Size: [0, 8388607] by call to `EC_POINT_mul` 
          788.       default:
          789.           for (i = 10; i < nwords; i++)
          790.               BN_CONSTTIME_SWAP(i);
                             ^
          791.           /* Fallthrough */
          792.       case 10:
