crypto/rsa/rsa_ossl.c:447: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 67108856] by call to `BN_MONT_CTX_set_locked`.
Showing all 18 steps of the trace


crypto/rsa/rsa_ossl.c:365:1: Parameter `rsa->n->top`
363.   }
364.   
365. > static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
366.                                      unsigned char *to, RSA *rsa, int padding)
367.   {

crypto/rsa/rsa_ossl.c:386:11: Call
384.       f = BN_CTX_get(ctx);
385.       ret = BN_CTX_get(ctx);
386.       num = BN_num_bytes(rsa->n);
                 ^
387.       buf = OPENSSL_malloc(num);
388.       if (ret == NULL || buf == NULL) {

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

crypto/bn/bn_lib.c:852:1: Parameter `a->top`
    850.   }
    851.   
    852. > int BN_is_zero(const BIGNUM *a)
    853.   {
    854.       return a->top == 0;

crypto/rsa/rsa_ossl.c:447:18: Call
445.   
446.           if (rsa->flags & RSA_FLAG_CACHE_PUBLIC)
447.               if (!BN_MONT_CTX_set_locked(&rsa->_method_mod_n, rsa->lock,
                        ^
448.                                           rsa->n, ctx)) {
449.                   BN_free(d);

crypto/bn/bn_mont.c:428:1: Parameter `mod->top`
  426.   }
  427.   
  428. > BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, CRYPTO_RWLOCK *lock,
  429.                                       const BIGNUM *mod, BN_CTX *ctx)
  430.   {

crypto/bn/bn_mont.c:450:10: Call
  448.       if (ret == NULL)
  449.           return NULL;
  450.       if (!BN_MONT_CTX_set(ret, mod, ctx)) {
                  ^
  451.           BN_MONT_CTX_free(ret);
  452.           return NULL;

crypto/bn/bn_mont.c:263:1: Parameter `mod->top`
    261.   }
    262.   
    263. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
    264.   {
    265.       int i, ret = 0;

crypto/bn/bn_mont.c:268:9: Call
    266.       BIGNUM *Ri, *R;
    267.   
    268.       if (BN_is_zero(mod))
                   ^
    269.           return 0;
    270.   

crypto/bn/bn_lib.c:852:1: Parameter `a->top`
      850.   }
      851.   
      852. > int BN_is_zero(const BIGNUM *a)
      853.   {
      854.       return a->top == 0;

crypto/bn/bn_mont.c:275:10: Call
    273.           goto err;
    274.       R = &(mont->RR);            /* grab RR as a temp */
    275.       if (!BN_copy(&(mont->N), mod))
                    ^
    276.           goto err;               /* Set N */
    277.       if (BN_get_flags(mod, BN_FLG_CONSTTIME) != 0)

crypto/bn/bn_lib.c:281:1: <Offset trace>
279.   }
280.   
281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
282.   {
283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: Parameter `b->top`
      279.   }
      280.   
      281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
      282.   {
      283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: <Length trace>
279.   }
280.   
281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
282.   {
283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: Parameter `*a->d`
      279.   }
      280.   
      281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
      282.   {
      283.       bn_check_top(b);

crypto/bn/bn_lib.c:287:9: Call
      285.       if (a == b)
      286.           return a;
      287.       if (bn_wexpand(a, b->top) == NULL)
                     ^
      288.           return NULL;
      289.   

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

crypto/bn/bn_lib.c:291:9: Array access: Offset added: [8, +oo] Size: [0, 67108856] by call to `BN_MONT_CTX_set_locked` 
      289.   
      290.       if (b->top > 0)
      291.           memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                     ^
      292.   
      293.       a->neg = b->neg;
