crypto/ec/ec_ameth.c:155: error: BUFFER_OVERRUN_L3
  Offset: [16, +oo] (⇐ 1 + [15, +oo]) Size: [0, 8388607] by call to `o2i_ECPublicKey`.
Showing all 63 steps of the trace


crypto/ec/ec_ameth.c:147:13: Call
145.       X509_ALGOR_get0(NULL, &ptype, &pval, palg);
146.   
147.       eckey = eckey_type2param(ptype, pval);
                   ^
148.   
149.       if (!eckey) {

crypto/ec/ec_ameth.c:116:17: Call
  114.               goto ecerr;
  115.           }
  116.           group = EC_GROUP_new_by_curve_name(OBJ_obj2nid(poid));
                         ^
  117.           if (group == NULL)
  118.               goto ecerr;

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;

crypto/ec/ec_ameth.c:155:10: Call
153.   
154.       /* We have parameters now set public key */
155.       if (!o2i_ECPublicKey(&eckey, &p, pklen)) {
                ^
156.           ECerr(EC_F_ECKEY_PUB_DECODE, EC_R_DECODE_ERROR);
157.           goto ecerr;

crypto/ec/ec_asn1.c:1109:1: Parameter `(*a)->group->field->top`
  1107.   }
  1108.   
  1109. > EC_KEY *o2i_ECPublicKey(EC_KEY **a, const unsigned char **in, long len)
  1110.   {
  1111.       EC_KEY *ret = NULL;

crypto/ec/ec_asn1.c:1121:10: Call
  1119.       }
  1120.       ret = *a;
  1121.       if (!EC_KEY_oct2key(ret, *in, len, NULL)) {
                   ^
  1122.           ECerr(EC_F_O2I_ECPUBLICKEY, ERR_R_EC_LIB);
  1123.           return 0;

crypto/ec/ec_key.c:526:1: Parameter `key->group->field->top`
    524.   }
    525.   
    526. > int EC_KEY_oct2key(EC_KEY *key, const unsigned char *buf, size_t len,
    527.                      BN_CTX *ctx)
    528.   {

crypto/ec/ec_key.c:535:9: Call
    533.       if (key->pub_key == NULL)
    534.           return 0;
    535.       if (EC_POINT_oct2point(key->group, key->pub_key, buf, len, ctx) == 0)
                   ^
    536.           return 0;
    537.       /*

crypto/ec/ec_oct.c:113:1: Parameter `group->field->top`
      111.   }
      112.   
      113. > int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *point,
      114.                          const unsigned char *buf, size_t len, BN_CTX *ctx)
      115.   {

crypto/ec/ec_oct.c:135:20: Call
      133.           }
      134.   #else
      135.               return ec_GF2m_simple_oct2point(group, point, buf, len, ctx);
                                ^
      136.   #endif
      137.       }

crypto/ec/ec2_oct.c:235:1: Parameter `group->field->top`
        233.    * simple implementation only uses affine coordinates.
        234.    */
        235. > int ec_GF2m_simple_oct2point(const EC_GROUP *group, EC_POINT *point,
        236.                                const unsigned char *buf, size_t len,
        237.                                BN_CTX *ctx)

crypto/ec/ec2_oct.c:304:14: Call
        302.   
        303.       if (form == POINT_CONVERSION_COMPRESSED) {
        304.           if (!EC_POINT_set_compressed_coordinates_GF2m
                            ^
        305.               (group, point, x, y_bit, ctx))
        306.               goto err;

crypto/ec/ec_oct.c:54:1: Parameter `group->field->top`
          52.   
          53.   #ifndef OPENSSL_NO_EC2M
          54. > int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group,
          55.                                                EC_POINT *point, const BIGNUM *x,
          56.                                                int y_bit, BN_CTX *ctx)

crypto/ec/ec_oct.c:71:20: Call
          69.       if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) {
          70.           if (group->meth->field_type == NID_X9_62_prime_field)
          71.               return ec_GFp_simple_set_compressed_coordinates(group, point, x,
                                   ^
          72.                                                               y_bit, ctx);
          73.           else

crypto/ec/ecp_oct.c:16:1: Parameter `group->field->top`
            14.   #include "ec_lcl.h"
            15.   
            16. > int ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group,
            17.                                                EC_POINT *point,
            18.                                                const BIGNUM *x_, int y_bit,

crypto/ec/ecp_oct.c:51:10: Call
            49.   
            50.       /* tmp1 := x^3 */
            51.       if (!BN_nnmod(x, x_, group->field, ctx))
                           ^
            52.           goto err;
            53.       if (group->meth->field_decode == 0) {

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:137:1: Parameter `divisor->top`
                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/ec/ecp_oct.c:101:10: Call
            99.       }
            100.   
            101.       if (!BN_mod_sqrt(y, tmp1, group->field, ctx)) {
                            ^
            102.           unsigned long err = ERR_peek_last_error();
            103.   

crypto/bn/bn_sqrt.c:13:1: Parameter `p->top`
              11.   #include "bn_lcl.h"
              12.   
              13. > BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
              14.   /*
              15.    * Returns 'ret' such that ret^2 == a (mod p), using the Tonelli/Shanks

crypto/bn/bn_sqrt.c:26:10: Call
              24.       int e, i, j;
              25.   
              26.       if (!BN_is_odd(p) || BN_abs_is_word(p, 1)) {
                             ^
              27.           if (BN_abs_is_word(p, 2)) {
              28.               if (ret == NULL)

crypto/bn/bn_lib.c:829:1: Parameter `a->top`
                827.   }
                828.   
                829. > int BN_is_odd(const BIGNUM *a)
                830.   {
                831.       return (a->top > 0) && (a->d[0] & 1);

crypto/bn/bn_sqrt.c:26:26: Call
              24.       int e, i, j;
              25.   
              26.       if (!BN_is_odd(p) || BN_abs_is_word(p, 1)) {
                                             ^
              27.           if (BN_abs_is_word(p, 2)) {
              28.               if (ret == NULL)

crypto/bn/bn_lib.c:809:1: Parameter `a->top`
                807.   }
                808.   
                809. > int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w)
                810.   {
                811.       return ((a->top == 1) && (a->d[0] == w)) || ((w == 0) && (a->top == 0));

crypto/bn/bn_sqrt.c:75:10: Call
              73.   
              74.       /* A = a mod p */
              75.       if (!BN_nnmod(A, a, p, ctx))
                             ^
              76.           goto end;
              77.   

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:137:1: Parameter `divisor->top`
                  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_sqrt.c:80:13: Call
              78.       /* now write  |p| - 1  as  2^e*q  where  q  is odd */
              79.       e = 1;
              80.       while (!BN_is_bit_set(p, e))
                                ^
              81.           e++;
              82.       /* we'll set  q  later (if needed) */

crypto/bn/bn_lib.c:626:1: Parameter `a->top`
                624.   }
                625.   
                626. > int BN_is_bit_set(const BIGNUM *a, int n)
                627.   {
                628.       int i, j;

crypto/bn/bn_sqrt.c:93:14: Call
              91.            * so we can use exponent  (|p|+1)/4,  i.e.  (|p|-3)/4 + 1.
              92.            */
              93.           if (!BN_rshift(q, p, 2))
                                 ^
              94.               goto end;
              95.           q->neg = 0;

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

crypto/bn/bn_sqrt.c:98:14: Call
              96.           if (!BN_add_word(q, 1))
              97.               goto end;
              98.           if (!BN_mod_exp(ret, A, q, p, ctx))
                                  ^
              99.               goto end;
              100.           err = 0;

crypto/bn/bn_exp.c:89:1: Parameter `m->top`
                87.   }
                88.   
                89. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
                90.                  BN_CTX *ctx)
                91.   {

crypto/bn/bn_exp.c:134:9: Call
                132.   
                133.   #ifdef MONT_MUL_MOD
                134.       if (BN_is_odd(m)) {
                               ^
                135.   # ifdef MONT_EXP_WORD
                136.           if (a->top == 1 && !a->neg

crypto/bn/bn_lib.c:829:1: Parameter `a->top`
                  827.   }
                  828.   
                  829. > int BN_is_odd(const BIGNUM *a)
                  830.   {
                  831.       return (a->top > 0) && (a->d[0] & 1);

crypto/bn/bn_exp.c:144:19: Call
                142.           } else
                143.   # endif
                144.               ret = BN_mod_exp_mont(r, a, p, m, ctx, NULL);
                                         ^
                145.       } else
                146.   #endif

crypto/bn/bn_exp.c:296:1: Parameter `m->top`
                  294.   }
                  295.   
                  296. > int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
                  297.                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
                  298.   {

crypto/bn/bn_exp.c:310:16: Call
                  308.               || BN_get_flags(a, BN_FLG_CONSTTIME) != 0
                  309.               || BN_get_flags(m, BN_FLG_CONSTTIME) != 0) {
                  310.           return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
                                        ^
                  311.       }
                  312.   

crypto/bn/bn_exp.c:747:14: Assignment
                    745.           /* 2^(top*BN_BITS2) - m */
                    746.           tmp.d[0] = (0 - m->d[0]) & BN_MASK2;
                    747.           for (i = 1; i < top; i++)
                                        ^
                    748.               tmp.d[i] = (~m->d[i]) & BN_MASK2;
                    749.           tmp.top = top;

crypto/bn/bn_exp.c:1046:14: Call
                    1044.           for (wvalue = 0, i = bits % window; i >= 0; i--, bits--)
                    1045.               wvalue = (wvalue << 1) + BN_is_bit_set(p, bits);
                    1046.           if (!MOD_EXP_CTIME_COPY_FROM_PREBUF(&tmp, top, powerbuf, wvalue,
                                         ^
                    1047.                                               window))
                    1048.               goto err;

crypto/bn/bn_exp.c:522:1: Parameter `top`
                      520.   }
                      521.   
                      522. > static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top,
                      523.                                             unsigned char *buf, int idx,
                      524.                                             int window)

crypto/bn/bn_exp.c:579:5: Assignment
                      577.       }
                      578.   
                      579.       b->top = top;
                                 ^
                      580.       bn_correct_top(b);
                      581.       return 1;

crypto/bn/bn_exp.c:580:5: Call
                      578.   
                      579.       b->top = top;
                      580.       bn_correct_top(b);
                                 ^
                      581.       return 1;
                      582.   }

crypto/bn/bn_lib.c:915:1: Parameter `a->top`
                        913.   }
                        914.   
                        915. > void bn_correct_top(BIGNUM *a)
                        916.   {
                        917.       BN_ULONG *ftl;

crypto/bn/bn_exp.c:1059:22: Call
                    1057.               /* Scan the window, squaring the result as we go */
                    1058.               for (i = 0; i < window; i++, bits--) {
                    1059.                   if (!BN_mod_mul_montgomery(&tmp, &tmp, &tmp, mont, ctx))
                                                 ^
                    1060.                       goto err;
                    1061.                   wvalue = (wvalue << 1) + BN_is_bit_set(p, bits);

crypto/bn/bn_mont.c:26:1: Parameter `a->top`
                      24.   #endif
                      25.   
                      26. > int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
                      27.                             BN_MONT_CTX *mont, BN_CTX *ctx)
                      28.   {

crypto/bn/bn_mont.c:53:14: Call
                      51.       bn_check_top(tmp);
                      52.       if (a == b) {
                      53.           if (!BN_sqr(tmp, a, ctx))
                                         ^
                      54.               goto err;
                      55.       } else {

crypto/bn/bn_sqr.c:17:1: Parameter `a->top`
                        15.    * I've just gone over this and it is now %20 faster on x86 - eay - 27 Jun 96
                        16.    */
                        17. > int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
                        18.   {
                        19.       int max, al;

crypto/bn/bn_sqr.c:25:5: Assignment
                        23.       bn_check_top(a);
                        24.   
                        25.       al = a->top;
                                  ^
                        26.       if (al <= 0) {
                        27.           r->top = 0;

crypto/bn/bn_sqr.c:74:17: Call
                        72.                   if (bn_wexpand(tmp, max) == NULL)
                        73.                       goto err;
                        74.                   bn_sqr_normal(rr->d, a->d, al, tmp->d);
                                              ^
                        75.               }
                        76.           }

crypto/bn/bn_sqr.c:105:1: <Offset trace>
103.   
104.   /* tmp must have 2*n words */
105. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
106.   {
107.       int i, j, max;

crypto/bn/bn_sqr.c:105:1: Parameter `n`
                          103.   
                          104.   /* tmp must have 2*n words */
                          105. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
                          106.   {
                          107.       int i, j, max;

crypto/bn/bn_sqr.c:116:5: Assignment
                          114.       rp[0] = rp[max - 1] = 0;
                          115.       rp++;
                          116.       j = n;
                                     ^
                          117.   
                          118.       if (--j > 0) {

crypto/bn/bn_sqr.c:118:9: Assignment
                          116.       j = n;
                          117.   
                          118.       if (--j > 0) {
                                         ^
                          119.           ap++;
                          120.           rp[j] = bn_mul_words(rp, ap, j, ap[-1]);

crypto/bn/bn_sqr.c:105:1: <Length trace>
103.   
104.   /* tmp must have 2*n words */
105. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
106.   {
107.       int i, j, max;

crypto/bn/bn_sqr.c:105:1: Parameter `*r`
                          103.   
                          104.   /* tmp must have 2*n words */
                          105. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
                          106.   {
                          107.       int i, j, max;

crypto/bn/bn_sqr.c:113:5: Assignment
                          111.       max = n * 2;
                          112.       ap = a;
                          113.       rp = r;
                                     ^
                          114.       rp[0] = rp[max - 1] = 0;
                          115.       rp++;

crypto/bn/bn_sqr.c:115:5: Assignment
                          113.       rp = r;
                          114.       rp[0] = rp[max - 1] = 0;
                          115.       rp++;
                                     ^
                          116.       j = n;
                          117.   

crypto/bn/bn_sqr.c:120:9: Array access: Offset: [16, +oo] (⇐ 1 + [15, +oo]) Size: [0, 8388607] by call to `o2i_ECPublicKey` 
                          118.       if (--j > 0) {
                          119.           ap++;
                          120.           rp[j] = bn_mul_words(rp, ap, j, ap[-1]);
                                         ^
                          121.           rp += 2;
                          122.       }
