crypto/bn/bn_prime.c:215: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 67108856] by call to `BN_MONT_CTX_set`.
Showing all 21 steps of the trace


crypto/bn/bn_prime.c:215:10: Call
213.       if (mont == NULL)
214.           goto err;
215.       if (!BN_MONT_CTX_set(mont, a, ctx))
                ^
216.           goto err;
217.   

crypto/bn/bn_mont.c:247:1: Parameter `mont->N.top`
  245.   }
  246.   
  247. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
  248.   {
  249.       int ret = 0;

crypto/bn/bn_mont.c:259:10: Call
  257.           goto err;
  258.       R = &(mont->RR);            /* grab RR as a temp */
  259.       if (!BN_copy(&(mont->N), mod))
                  ^
  260.           goto err;               /* Set N */
  261.       if (BN_get_flags(mod, BN_FLG_CONSTTIME) != 0)

crypto/bn/bn_lib.c:312:1: Parameter `a->top`
    310.   }
    311.   
    312. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
    313.   {
    314.       bn_check_top(b);

crypto/bn/bn_lib.c:318:9: Call
    316.       if (a == b)
    317.           return a;
    318.       if (bn_wexpand(a, b->top) == NULL)
                   ^
    319.           return NULL;
    320.   

crypto/bn/bn_lib.c:937:1: Parameter `a->top`
      935.   }
      936.   
      937. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
      938.   {
      939.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:939:37: Call
      937.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
      938.   {
      939.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                                 ^
      940.   }
      941.   

crypto/bn/bn_lib.c:273:1: Parameter `b->top`
        271.    */
        272.   
        273. > BIGNUM *bn_expand2(BIGNUM *b, int words)
        274.   {
        275.       bn_check_top(b);

crypto/bn/bn_lib.c:278:23: Call
        276.   
        277.       if (words > b->dmax) {
        278.           BN_ULONG *a = bn_expand_internal(b, words);
                                     ^
        279.           if (!a)
        280.               return NULL;

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

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

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

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

crypto/bn/bn_lib.c:252:13: Call
          250.           a = OPENSSL_secure_zalloc(words * sizeof(*a));
          251.       else
          252.           a = OPENSSL_zalloc(words * sizeof(*a));
                             ^
          253.       if (a == NULL) {
          254.           BNerr(BN_F_BN_EXPAND_INTERNAL, ERR_R_MALLOC_FAILURE);

crypto/mem.c:221:1: Parameter `num`
            219.   }
            220.   
            221. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
            222.   {
            223.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:223:17: Call
            221.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
            222.   {
            223.       void *ret = CRYPTO_malloc(num, file, line);
                                   ^
            224.   
            225.       FAILTEST();

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

crypto/mem.c:223:5: Assignment
            221.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
            222.   {
            223.       void *ret = CRYPTO_malloc(num, file, line);
                       ^
            224.   
            225.       FAILTEST();

crypto/mem.c:228:5: Assignment
            226.       if (ret != NULL)
            227.           memset(ret, 0, num);
            228.       return ret;
                       ^
            229.   }
            230.   

crypto/bn/bn_lib.c:252:9: Assignment
          250.           a = OPENSSL_secure_zalloc(words * sizeof(*a));
          251.       else
          252.           a = OPENSSL_zalloc(words * sizeof(*a));
                         ^
          253.       if (a == NULL) {
          254.           BNerr(BN_F_BN_EXPAND_INTERNAL, ERR_R_MALLOC_FAILURE);

crypto/bn/bn_lib.c:260:9: Array access: Offset added: [8, +oo] Size: [0, 67108856] by call to `BN_MONT_CTX_set` 
          258.       assert(b->top <= words);
          259.       if (b->top > 0)
          260.           memcpy(a, b->d, sizeof(*a) * b->top);
                         ^
          261.   
          262.       return a;
