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


apps/s_client.c:346:9: Call
344.       int ret =
345.           g != NULL && N != NULL && bn_ctx != NULL && BN_is_odd(N) &&
346.           BN_is_prime_ex(N, SRP_NUMBER_ITERATIONS_FOR_PRIME, bn_ctx, NULL) &&
               ^
347.           p != NULL && BN_rshift1(p, N) &&
348.           /* p = (N-1)/2 */

crypto/bn/bn_prime.c:296:12: Call
  294.                      BN_GENCB *cb)
  295.   {
  296.       return BN_is_prime_fasttest_ex(a, checks, ctx_passed, 0, cb);
                    ^
  297.   }
  298.   

crypto/bn/bn_prime.c:299:1: Parameter `a->top`
    297.   }
    298.   
    299. > int BN_is_prime_fasttest_ex(const BIGNUM *a, int checks, BN_CTX *ctx_passed,
    300.                               int do_trial_division, BN_GENCB *cb)
    301.   {

crypto/bn/bn_prime.c:309:9: Call
    307.       const BIGNUM *A = NULL;
    308.   
    309.       if (BN_cmp(a, BN_value_one()) <= 0)
                   ^
    310.           return 0;
    311.   

crypto/bn/bn_lib.c:700:1: Parameter `a->top`
      698.   }
      699.   
      700. > int BN_cmp(const BIGNUM *a, const BIGNUM *b)
      701.   {
      702.       int i;

apps/s_client.c:347:22: Call
345.           g != NULL && N != NULL && bn_ctx != NULL && BN_is_odd(N) &&
346.           BN_is_prime_ex(N, SRP_NUMBER_ITERATIONS_FOR_PRIME, bn_ctx, NULL) &&
347.           p != NULL && BN_rshift1(p, N) &&
                            ^
348.           /* p = (N-1)/2 */
349.           BN_is_prime_ex(p, SRP_NUMBER_ITERATIONS_FOR_PRIME, bn_ctx, NULL) &&

crypto/bn/bn_shift.c:102:9: Call
  100.       bn_check_top(a);
  101.   
  102.       if (BN_is_zero(a)) {
                 ^
  103.           BN_zero(r);
  104.           return (1);

crypto/bn/bn_lib.c:975:1: Parameter `a->top`
    973.   }
    974.   
    975. > int BN_is_zero(const BIGNUM *a)
    976.   {
    977.       return a->top == 0;

apps/s_client.c:352:9: Call
350.           r != NULL &&
351.           /* verify g^((N-1)/2) == -1 (mod N) */
352.           BN_mod_exp(r, g, p, N, bn_ctx) &&
               ^
353.           BN_add_word(r, 1) && BN_cmp(r, N) == 0;
354.   

crypto/bn/bn_exp.c:190:1: Parameter `m->top`
  188.   }
  189.   
  190. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
  191.                  BN_CTX *ctx)
  192.   {

crypto/bn/bn_exp.c:242:9: Call
  240.       /* if ((m->d[m->top-1]&BN_TBIT) && BN_is_odd(m)) */
  241.   
  242.       if (BN_is_odd(m)) {
                 ^
  243.   # ifdef MONT_EXP_WORD
  244.           if (a->top == 1 && !a->neg

crypto/bn/bn_lib.c:990:1: Parameter `a->top`
    988.   }
    989.   
    990. > int BN_is_odd(const BIGNUM *a)
    991.   {
    992.       return (a->top > 0) && (a->d[0] & 1);

crypto/bn/bn_exp.c:247:19: Call
  245.               && (BN_get_flags(p, BN_FLG_CONSTTIME) == 0)) {
  246.               BN_ULONG A = a->d[0];
  247.               ret = BN_mod_exp_mont_word(r, A, p, m, ctx, NULL);
                           ^
  248.           } else
  249.   # endif

crypto/bn/bn_exp.c:1151:1: Parameter `m->top`
    1149.   }
    1150.   
    1151. > int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p,
    1152.                            const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
    1153.   {

crypto/bn/bn_exp.c:1186:10: Call
    1184.       bn_check_top(m);
    1185.   
    1186.       if (!BN_is_odd(m)) {
                     ^
    1187.           BNerr(BN_F_BN_MOD_EXP_MONT_WORD, BN_R_CALLED_WITH_EVEN_MODULUS);
    1188.           return (0);

crypto/bn/bn_lib.c:990:1: Parameter `a->top`
      988.   }
      989.   
      990. > int BN_is_odd(const BIGNUM *a)
      991.   {
      992.       return (a->top > 0) && (a->d[0] & 1);

crypto/bn/bn_exp.c:1241:22: Call
    1239.                   r_is_one = 0;
    1240.               } else {
    1241.                   if (!BN_MOD_MUL_WORD(r, w, m))
                                 ^
    1242.                       goto err;
    1243.               }

crypto/bn/bn_div.c:253:31: Call
      251.   
      252.       /* First we normalise the numbers */
      253.       norm_shift = BN_BITS2 - ((BN_num_bits(divisor)) % BN_BITS2);
                                           ^
      254.       if (!(BN_lshift(sdiv, divisor, norm_shift)))
      255.           goto err;

crypto/bn/bn_lib.c:220:9: Assignment
        218.   
        219.       if (BN_is_zero(a))
        220.           return 0;
                       ^
        221.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));
        222.   }

crypto/bn/bn_div.c:253:5: Assignment
      251.   
      252.       /* First we normalise the numbers */
      253.       norm_shift = BN_BITS2 - ((BN_num_bits(divisor)) % BN_BITS2);
                 ^
      254.       if (!(BN_lshift(sdiv, divisor, norm_shift)))
      255.           goto err;

crypto/bn/bn_div.c:254:11: Call
      252.       /* First we normalise the numbers */
      253.       norm_shift = BN_BITS2 - ((BN_num_bits(divisor)) % BN_BITS2);
      254.       if (!(BN_lshift(sdiv, divisor, norm_shift)))
                       ^
      255.           goto err;
      256.       sdiv->neg = 0;

crypto/bn/bn_shift.c:129:1: <Offset trace>
127.   }
128.   
129. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
130.   {
131.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:129:1: Parameter `n`
        127.   }
        128.   
        129. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
        130.   {
        131.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:144:5: Assignment
        142.   
        143.       r->neg = a->neg;
        144.       nw = n / BN_BITS2;
                   ^
        145.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
        146.           return (0);

crypto/bn/bn_shift.c:129:1: <Length trace>
127.   }
128.   
129. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
130.   {
131.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:129:1: Parameter `*r->d`
        127.   }
        128.   
        129. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
        130.   {
        131.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:145:9: Call
        143.       r->neg = a->neg;
        144.       nw = n / BN_BITS2;
        145.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
                       ^
        146.           return (0);
        147.       lb = n % BN_BITS2;

crypto/bn/bn_lib.c:1071:1: Parameter `*a->d`
          1069.   }
          1070.   
          1071. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
          1072.   {
          1073.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_shift.c:150:5: Assignment
        148.       rb = BN_BITS2 - lb;
        149.       f = a->d;
        150.       t = r->d;
                   ^
        151.       t[a->top + nw] = 0;
        152.       if (lb == 0)

crypto/bn/bn_shift.c:158:13: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `BN_mod_exp` 
        156.           for (i = a->top - 1; i >= 0; i--) {
        157.               l = f[i];
        158.               t[nw + i + 1] |= (l >> rb) & BN_MASK2;
                           ^
        159.               t[nw + i] = (l << lb) & BN_MASK2;
        160.           }
