apps/s_client.c:287: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 67108856] by call to `BN_mod_exp`.
Showing all 30 steps of the trace


apps/s_client.c:274:1: Parameter `N->top`
272.   # define SRP_NUMBER_ITERATIONS_FOR_PRIME 64
273.   
274. > static int srp_Verify_N_and_g(const BIGNUM *N, const BIGNUM *g)
275.   {
276.       BN_CTX *bn_ctx = BN_CTX_new();

apps/s_client.c:280:53: Call
278.       BIGNUM *r = BN_new();
279.       int ret =
280.           g != NULL && N != NULL && bn_ctx != NULL && BN_is_odd(N) &&
                                                           ^
281.           BN_is_prime_ex(N, SRP_NUMBER_ITERATIONS_FOR_PRIME, bn_ctx, NULL) == 1 &&
282.           p != NULL && BN_rshift1(p, N) &&

crypto/bn/bn_lib.c:860:1: Parameter `a->top`
  858.   }
  859.   
  860. > int BN_is_odd(const BIGNUM *a)
  861.   {
  862.       return (a->top > 0) && (a->d[0] & 1);

apps/s_client.c:281:9: Call
279.       int ret =
280.           g != NULL && N != NULL && bn_ctx != NULL && BN_is_odd(N) &&
281.           BN_is_prime_ex(N, SRP_NUMBER_ITERATIONS_FOR_PRIME, bn_ctx, NULL) == 1 &&
               ^
282.           p != NULL && BN_rshift1(p, N) &&
283.           /* p = (N-1)/2 */

crypto/bn/bn_prime.c:145:1: Parameter `a->top`
  143.   }
  144.   
  145. > int BN_is_prime_ex(const BIGNUM *a, int checks, BN_CTX *ctx_passed,
  146.                      BN_GENCB *cb)
  147.   {

crypto/bn/bn_prime.c:148:12: Call
  146.                      BN_GENCB *cb)
  147.   {
  148.       return BN_is_prime_fasttest_ex(a, checks, ctx_passed, 0, cb);
                    ^
  149.   }
  150.   

crypto/bn/bn_prime.c:151:1: Parameter `a->top`
    149.   }
    150.   
    151. > int BN_is_prime_fasttest_ex(const BIGNUM *a, int checks, BN_CTX *ctx_passed,
    152.                               int do_trial_division, BN_GENCB *cb)
    153.   {

crypto/bn/bn_prime.c:161:9: Call
    159.   
    160.       /* Take care of the really small primes 2 & 3 */
    161.       if (BN_is_word(a, 2) || BN_is_word(a, 3))
                   ^
    162.           return 1;
    163.   

crypto/bn/bn_lib.c:855:1: Parameter `a->top`
      853.   }
      854.   
      855. > int BN_is_word(const BIGNUM *a, const BN_ULONG w)
      856.   {
      857.       return BN_abs_is_word(a, w) && (!w || !a->neg);

crypto/bn/bn_lib.c:857:12: Call
      855.   int BN_is_word(const BIGNUM *a, const BN_ULONG w)
      856.   {
      857.       return BN_abs_is_word(a, w) && (!w || !a->neg);
                        ^
      858.   }
      859.   

crypto/bn/bn_lib.c:840:1: Parameter `a->top`
        838.   }
        839.   
        840. > int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w)
        841.   {
        842.       return ((a->top == 1) && (a->d[0] == w)) || ((w == 0) && (a->top == 0));

apps/s_client.c:282:22: Call
280.           g != NULL && N != NULL && bn_ctx != NULL && BN_is_odd(N) &&
281.           BN_is_prime_ex(N, SRP_NUMBER_ITERATIONS_FOR_PRIME, bn_ctx, NULL) == 1 &&
282.           p != NULL && BN_rshift1(p, N) &&
                            ^
283.           /* p = (N-1)/2 */
284.           BN_is_prime_ex(p, SRP_NUMBER_ITERATIONS_FOR_PRIME, bn_ctx, NULL) == 1 &&

crypto/bn/bn_shift.c:54:9: Call
  52.       bn_check_top(a);
  53.   
  54.       if (BN_is_zero(a)) {
                ^
  55.           BN_zero(r);
  56.           return 1;

crypto/bn/bn_lib.c:845:1: Parameter `a->top`
    843.   }
    844.   
    845. > int BN_is_zero(const BIGNUM *a)
    846.   {
    847.       return a->top == 0;

apps/s_client.c:287:9: Call
285.           r != NULL &&
286.           /* verify g^((N-1)/2) == -1 (mod N) */
287.           BN_mod_exp(r, g, p, N, bn_ctx) &&
               ^
288.           BN_add_word(r, 1) && BN_cmp(r, N) == 0;
289.   

crypto/bn/bn_exp.c:89:1: Parameter `m->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:134:9: Call
  132.   
  133.   #ifdef MONT_MUL_MOD
  134.       if (BN_is_odd(m)) {
                 ^
  135.   # ifdef MONT_EXP_WORD
  136.           if (a->top == 1 && !a->neg

crypto/bn/bn_lib.c:860:1: Parameter `a->top`
    858.   }
    859.   
    860. > int BN_is_odd(const BIGNUM *a)
    861.   {
    862.       return (a->top > 0) && (a->d[0] & 1);

crypto/bn/bn_exp.c:149:15: Call
  147.   #ifdef RECP_MUL_MOD
  148.       {
  149.           ret = BN_mod_exp_recp(r, a, p, m, ctx);
                       ^
  150.       }
  151.   #else

crypto/bn/bn_exp.c:161:1: Parameter `m->top`
    159.   }
    160.   
    161. > int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
    162.                       const BIGNUM *m, BN_CTX *ctx)
    163.   {

crypto/bn/bn_exp.c:206:13: Call
    204.               goto err;
    205.       } else {
    206.           if (BN_RECP_CTX_set(&recp, m, ctx) <= 0)
                       ^
    207.               goto err;
    208.       }

crypto/bn/bn_recp.c:45:1: Parameter `d->top`
      43.   }
      44.   
      45. > int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *d, BN_CTX *ctx)
      46.   {
      47.       if (!BN_copy(&(recp->N), d))

crypto/bn/bn_recp.c:47:10: Call
      45.   int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *d, BN_CTX *ctx)
      46.   {
      47.       if (!BN_copy(&(recp->N), d))
                     ^
      48.           return 0;
      49.       BN_zero(&(recp->Nr));

crypto/bn/bn_lib.c:285:1: <Offset trace>
283.   }
284.   
285. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
286.   {
287.       bn_check_top(b);

crypto/bn/bn_lib.c:285:1: Parameter `b->top`
        283.   }
        284.   
        285. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
        286.   {
        287.       bn_check_top(b);

crypto/bn/bn_lib.c:285:1: <Length trace>
283.   }
284.   
285. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
286.   {
287.       bn_check_top(b);

crypto/bn/bn_lib.c:285:1: Parameter `*a->d`
        283.   }
        284.   
        285. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
        286.   {
        287.       bn_check_top(b);

crypto/bn/bn_lib.c:291:9: Call
        289.       if (a == b)
        290.           return a;
        291.       if (bn_wexpand(a, b->top) == NULL)
                       ^
        292.           return NULL;
        293.   

crypto/bn/bn_lib.c:941:1: Parameter `*a->d`
          939.   }
          940.   
          941. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
          942.   {
          943.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:295:9: Array access: Offset added: [8, +oo] Size: [0, 67108856] by call to `BN_mod_exp` 
        293.   
        294.       if (b->top > 0)
        295.           memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                       ^
        296.   
        297.       a->top = b->top;
