crypto/bn/bn_exp.c:354: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 67108856] by call to `BN_nnmod`.
Showing all 26 steps of the trace


crypto/bn/bn_exp.c:349:14: Call
347.           if ((mont = BN_MONT_CTX_new()) == NULL)
348.               goto err;
349.           if (!BN_MONT_CTX_set(mont, m, ctx))
                    ^
350.               goto err;
351.       }

crypto/bn/bn_mont.c:331:14: Call
  329.           if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
  330.               goto err;
  331.           if (!BN_lshift(Ri, Ri, BN_BITS2))
                      ^
  332.               goto err;           /* R*Ri */
  333.           if (!BN_is_zero(Ri)) {

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

crypto/bn/bn_exp.c:354:14: Call
352.   
353.       if (a->neg || BN_ucmp(a, m) >= 0) {
354.           if (!BN_nnmod(val[0], a, m, ctx))
                    ^
355.               goto err;
356.           aa = val[0];

crypto/bn/bn_mod.c:13:1: Parameter `r->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 `rm->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_div.c:182:17: Call
    180.       if (!no_branch && BN_ucmp(num, divisor) < 0) {
    181.           if (rm != NULL) {
    182.               if (BN_copy(rm, num) == NULL)
                           ^
    183.                   return 0;
    184.           }

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:940:1: Parameter `a->top`
        938.   }
        939.   
        940. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
        941.   {
        942.       return (words <= a->dmax) ? a : bn_expand2(a, words);

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

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:218:1: Parameter `num`
              216.   }
              217.   
              218. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
              219.   {
              220.       void *ret = CRYPTO_malloc(num, file, line);

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

crypto/mem.c:198:9: Assignment
                196.   
                197.       if (num == 0)
                198.           return NULL;
                               ^
                199.   
                200.       FAILTEST();

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

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

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_nnmod` 
            258.       assert(b->top <= words);
            259.       if (b->top > 0)
            260.           memcpy(a, b->d, sizeof(*a) * b->top);
                           ^
            261.   
            262.       return a;
