crypto/ec/ecp_oct.c:134: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 67108856] by call to `BN_usub`.
Showing all 21 steps of the trace


crypto/ec/ecp_oct.c:62:14: Call
60.           if (!BN_mod_sqr(tmp2, x_, group->field, ctx))
61.               goto err;
62.           if (!BN_mod_mul(tmp1, tmp2, x_, group->field, ctx))
                   ^
63.               goto err;
64.       }

crypto/bn/bn_mod.c:73:1: Parameter `r->top`
  71.   
  72.   /* slow but works */
  73. > int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
  74.                  BN_CTX *ctx)
  75.   {

crypto/ec/ecp_oct.c:134:14: Call
132.               goto err;
133.           }
134.           if (!BN_usub(y, group->field, y))
                    ^
135.               goto err;
136.       }

crypto/bn/bn_add.c:125:1: Parameter `r->top`
  123.   
  124.   /* unsigned subtraction of b from a, a must be larger than b. */
  125. > int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
  126.   {
  127.       int max, min, dif;

crypto/bn/bn_add.c:143:9: Call
  141.       }
  142.   
  143.       if (bn_wexpand(r, max) == NULL)
                 ^
  144.           return 0;
  145.   

crypto/bn/bn_lib.c:910:1: Parameter `a->top`
    908.   }
    909.   
    910. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
    911.   {
    912.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:912:37: Call
    910.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
    911.   {
    912.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                               ^
    913.   }
    914.   

crypto/bn/bn_lib.c:246:1: Parameter `b->top`
      244.    */
      245.   
      246. > BIGNUM *bn_expand2(BIGNUM *b, int words)
      247.   {
      248.       bn_check_top(b);

crypto/bn/bn_lib.c:251:23: Call
      249.   
      250.       if (words > b->dmax) {
      251.           BN_ULONG *a = bn_expand_internal(b, words);
                                   ^
      252.           if (!a)
      253.               return NULL;

crypto/bn/bn_lib.c:208:1: <Offset trace>
206.   /* This is used by bn_expand2() */
207.   /* The caller MUST check that words > b->dmax before calling this */
208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
209.   {
210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:208:1: Parameter `b->top`
        206.   /* This is used by bn_expand2() */
        207.   /* The caller MUST check that words > b->dmax before calling this */
        208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
        209.   {
        210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:208:1: <Length trace>
206.   /* This is used by bn_expand2() */
207.   /* The caller MUST check that words > b->dmax before calling this */
208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
209.   {
210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:208:1: Parameter `words`
        206.   /* This is used by bn_expand2() */
        207.   /* The caller MUST check that words > b->dmax before calling this */
        208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
        209.   {
        210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:225:13: Call
        223.           a = OPENSSL_secure_zalloc(words * sizeof(*a));
        224.       else
        225.           a = OPENSSL_zalloc(words * sizeof(*a));
                           ^
        226.       if (a == NULL) {
        227.           BNerr(BN_F_BN_EXPAND_INTERNAL, ERR_R_MALLOC_FAILURE);

crypto/mem.c:228:1: Parameter `num`
          226.   }
          227.   
          228. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
          229.   {
          230.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:230:17: Call
          228.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
          229.   {
          230.       void *ret = CRYPTO_malloc(num, file, line);
                                 ^
          231.   
          232.       FAILTEST();

crypto/mem.c:201:9: Assignment
            199.   
            200.       if (num == 0)
            201.           return NULL;
                           ^
            202.   
            203.       FAILTEST();

crypto/mem.c:230:5: Assignment
          228.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
          229.   {
          230.       void *ret = CRYPTO_malloc(num, file, line);
                     ^
          231.   
          232.       FAILTEST();

crypto/mem.c:235:5: Assignment
          233.       if (ret != NULL)
          234.           memset(ret, 0, num);
          235.       return ret;
                     ^
          236.   }
          237.   

crypto/bn/bn_lib.c:225:9: Assignment
        223.           a = OPENSSL_secure_zalloc(words * sizeof(*a));
        224.       else
        225.           a = OPENSSL_zalloc(words * sizeof(*a));
                       ^
        226.       if (a == NULL) {
        227.           BNerr(BN_F_BN_EXPAND_INTERNAL, ERR_R_MALLOC_FAILURE);

crypto/bn/bn_lib.c:233:9: Array access: Offset added: [8, +oo] Size: [0, 67108856] by call to `BN_usub` 
        231.       assert(b->top <= words);
        232.       if (b->top > 0)
        233.           memcpy(a, b->d, sizeof(*a) * b->top);
                       ^
        234.   
        235.       return a;
