test/ectest.c:1141: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `EC_GROUP_check`.
Showing all 35 steps of the trace


test/ectest.c:1136:10: Call
1134.       int nid = curves[n].nid;
1135.   
1136.       if (!TEST_ptr(group = EC_GROUP_new_by_curve_name(nid))) {
                 ^
1137.           TEST_info("EC_GROUP_new_curve_name() failed with curve %s\n",
1138.                     OBJ_nid2sn(nid));

crypto/ec/ec_curve.c:3125:19: Call
  3123.       for (i = 0; i < curve_list_length; i++)
  3124.           if (curve_list[i].nid == nid) {
  3125.               ret = ec_group_new_from_data(curve_list[i]);
                            ^
  3126.               break;
  3127.           }

crypto/ec/ec_curve.c:3038:14: Call
    3036.       params += seed_len;         /* skip seed */
    3037.   
    3038.       if ((p = BN_bin2bn(params + 0 * param_len, param_len, NULL)) == NULL
                         ^
    3039.           || (a = BN_bin2bn(params + 1 * param_len, param_len, NULL)) == NULL
    3040.           || (b = BN_bin2bn(params + 2 * param_len, param_len, NULL)) == NULL) {

crypto/bn/bn_lib.c:369:1: Parameter `ret->top`
      367.   }
      368.   
      369. > BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)
      370.   {
      371.       unsigned int i, m;

test/ectest.c:1141:10: Call
1139.           return 0;
1140.       }
1141.       if (!TEST_true(EC_GROUP_check(group, NULL))) {
                 ^
1142.           TEST_info("EC_GROUP_check() failed with curve %s\n", OBJ_nid2sn(nid));
1143.           EC_GROUP_free(group);

crypto/ec/ec_check.c:13:1: Parameter `group->order->top`
  11.   #include <openssl/err.h>
  12.   
  13. > int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx)
  14.   {
  15.       int ret = 0;

crypto/ec/ec_check.c:54:9: Call
  52.       if (order == NULL)
  53.           goto err;
  54.       if (BN_is_zero(order)) {
                ^
  55.           ECerr(EC_F_EC_GROUP_CHECK, EC_R_UNDEFINED_ORDER);
  56.           goto err;

crypto/bn/bn_lib.c:827:1: Parameter `a->top`
    825.   }
    826.   
    827. > int BN_is_zero(const BIGNUM *a)
    828.   {
    829.       return a->top == 0;

crypto/ec/ec_check.c:59:10: Call
  57.       }
  58.   
  59.       if (!EC_POINT_mul(group, point, order, NULL, NULL, ctx))
                 ^
  60.           goto err;
  61.       if (!EC_POINT_is_at_infinity(group, point)) {

crypto/ec/ec_lib.c:922:1: Parameter `group->order->top`
    920.   }
    921.   
    922. > int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar,
    923.                    const EC_POINT *point, const BIGNUM *p_scalar, BN_CTX *ctx)
    924.   {

crypto/ec/ec_lib.c:933:12: Call
    931.       scalars[0] = p_scalar;
    932.   
    933.       return EC_POINTs_mul(group, r, g_scalar,
                      ^
    934.                            (point != NULL
    935.                             && p_scalar != NULL), points, scalars, ctx);

crypto/ec/ec_lib.c:911:1: Parameter `group->order->top`
      909.    */
      910.   
      911. > int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
      912.                     size_t num, const EC_POINT *points[],
      913.                     const BIGNUM *scalars[], BN_CTX *ctx)

crypto/ec/ec_lib.c:917:16: Call
      915.       if (group->meth->mul == 0)
      916.           /* use default */
      917.           return ec_wNAF_mul(group, r, scalar, num, points, scalars, ctx);
                            ^
      918.   
      919.       return group->meth->mul(group, r, scalar, num, points, scalars, ctx);

crypto/ec/ec_mult.c:346:1: Parameter `group->order->top`
        344.    * in the addition if scalar != NULL
        345.    */
        346. > int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
        347.                   size_t num, const EC_POINT *points[], const BIGNUM *scalars[],
        348.                   BN_CTX *ctx)

crypto/ec/ec_mult.c:388:16: Call
        386.            * constant time version.
        387.            */
        388.           return ec_mul_consttime(group, r, scalar, NULL, ctx);
                              ^
        389.       }
        390.       if ((scalar == NULL) && (num == 1)) {

crypto/ec/ec_mult.c:131:1: Parameter `group->order->top`
          129.    * Returns 1 on success, 0 otherwise.
          130.    */
          131. > static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r,
          132.                               const BIGNUM *scalar, const EC_POINT *point,
          133.                               BN_CTX *ctx)

crypto/ec/ec_mult.c:148:18: Call
          146.           goto err;
          147.   
          148.       order_bits = BN_num_bits(group->order);
                                  ^
          149.   
          150.       s = EC_POINT_new(group);

crypto/bn/bn_lib.c:139:9: Call
            137.       bn_check_top(a);
            138.   
            139.       if (BN_is_zero(a))
                           ^
            140.           return 0;
            141.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));

crypto/bn/bn_lib.c:827:1: Parameter `a->top`
              825.   }
              826.   
              827. > int BN_is_zero(const BIGNUM *a)
              828.   {
              829.       return a->top == 0;

crypto/ec/ec_mult.c:193:14: Call
          191.            * constant-timeness
          192.            */
          193.           if (!BN_nnmod(k, k, group->order, ctx))
                              ^
          194.               goto err;
          195.       }

crypto/bn/bn_mod.c:13:1: Parameter `d->top`
            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:199:31: Call
              197.   
              198.       /* First we normalise the numbers */
              199.       norm_shift = BN_BITS2 - ((BN_num_bits(divisor)) % BN_BITS2);
                                                   ^
              200.       if (!(BN_lshift(sdiv, divisor, norm_shift)))
              201.           goto err;

crypto/bn/bn_lib.c:140:9: Assignment
                138.   
                139.       if (BN_is_zero(a))
                140.           return 0;
                               ^
                141.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));
                142.   }

crypto/bn/bn_div.c:199:5: Assignment
              197.   
              198.       /* First we normalise the numbers */
              199.       norm_shift = BN_BITS2 - ((BN_num_bits(divisor)) % BN_BITS2);
                         ^
              200.       if (!(BN_lshift(sdiv, divisor, norm_shift)))
              201.           goto err;

crypto/bn/bn_div.c:200:11: Call
              198.       /* First we normalise the numbers */
              199.       norm_shift = BN_BITS2 - ((BN_num_bits(divisor)) % BN_BITS2);
              200.       if (!(BN_lshift(sdiv, divisor, norm_shift)))
                               ^
              201.           goto err;
              202.       sdiv->neg = 0;

crypto/bn/bn_shift.c:83:1: <Offset trace>
81.   }
82.   
83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
84.   {
85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:83:1: Parameter `n`
                81.   }
                82.   
                83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
                84.   {
                85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:97:5: Assignment
                95.       }
                96.   
                97.       nw = n / BN_BITS2;
                           ^
                98.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
                99.           return 0;

crypto/bn/bn_shift.c:83:1: <Length trace>
81.   }
82.   
83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
84.   {
85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:83:1: Parameter `*r->d`
                81.   }
                82.   
                83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
                84.   {
                85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:98:9: Call
                96.   
                97.       nw = n / BN_BITS2;
                98.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
                               ^
                99.           return 0;
                100.       r->neg = a->neg;

crypto/bn/bn_lib.c:923:1: Parameter `*a->d`
                  921.   }
                  922.   
                  923. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
                  924.   {
                  925.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_shift.c:104:5: Assignment
                102.       rb = BN_BITS2 - lb;
                103.       f = a->d;
                104.       t = r->d;
                           ^
                105.       t[a->top + nw] = 0;
                106.       if (lb == 0)

crypto/bn/bn_shift.c:112:13: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `EC_GROUP_check` 
                110.           for (i = a->top - 1; i >= 0; i--) {
                111.               l = f[i];
                112.               t[nw + i + 1] |= (l >> rb) & BN_MASK2;
                                   ^
                113.               t[nw + i] = (l << lb) & BN_MASK2;
                114.           }
