crypto/srp/srp_lib.c:185: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 67108856] by call to `BN_mod_exp`.
Showing all 27 steps of the trace


crypto/srp/srp_lib.c:185:10: Call
183.           goto err;
184.   
185.       if (!BN_mod_exp(tmp, g, x, N, bn_ctx))
                ^
186.           goto err;
187.       if ((k = srp_Calc_k(N, g)) == NULL)

crypto/bn/bn_exp.c:89:1: Parameter `r->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: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 `rr->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:598:1: Parameter `rr->top`
      596.    * http://www.daemonology.net/hyperthreading-considered-harmful/)
      597.    */
      598. > int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
      599.                                 const BIGNUM *m, BN_CTX *ctx,
      600.                                 BN_MONT_CTX *in_mont)

crypto/bn/bn_exp.c:1087:10: Call
      1085.       } else
      1086.   #endif
      1087.       if (!BN_from_montgomery(rr, &tmp, mont, ctx))
                       ^
      1088.           goto err;
      1089.       ret = 1;

crypto/bn/bn_mont.c:149:1: Parameter `ret->top`
        147.   #endif                          /* MONT_WORD */
        148.   
        149. > int BN_from_montgomery(BIGNUM *ret, const BIGNUM *a, BN_MONT_CTX *mont,
        150.                          BN_CTX *ctx)
        151.   {

crypto/bn/bn_mont.c:158:16: Call
        156.       BN_CTX_start(ctx);
        157.       if ((t = BN_CTX_get(ctx)) && BN_copy(t, a))
        158.           retn = BN_from_montgomery_word(ret, t, mont);
                              ^
        159.       BN_CTX_end(ctx);
        160.   #else                           /* !MONT_WORD */

crypto/bn/bn_mont.c:75:1: Parameter `ret->top`
          73.   
          74.   #ifdef MONT_WORD
          75. > static int BN_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont)
          76.   {
          77.       BIGNUM *n;

crypto/bn/bn_mont.c:117:9: Call
          115.       }
          116.   
          117.       if (bn_wexpand(ret, nl) == NULL)
                         ^
          118.           return 0;
          119.       ret->top = nl;

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: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: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_mod_exp` 
                231.       assert(b->top <= words);
                232.       if (b->top > 0)
                233.           memcpy(a, b->d, sizeof(*a) * b->top);
                               ^
                234.   
                235.       return a;
