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


apps/s_client.c:326:9: Call
324.           BIO_printf(bio_err, "SRP parameters:\n");
325.           BIO_printf(bio_err, "\tN=");
326.           BN_print(bio_err, N);
               ^
327.           BIO_printf(bio_err, "\n\tg=");
328.           BN_print(bio_err, g);

crypto/bn/bn_print.c:304:1: Parameter `a->top`
  302.   # endif
  303.   
  304. > int BN_print(BIO *bp, const BIGNUM *a)
  305.   {
  306.       int i, j, v, z = 0;

apps/s_client.c:328:9: Call
326.           BN_print(bio_err, N);
327.           BIO_printf(bio_err, "\n\tg=");
328.           BN_print(bio_err, g);
               ^
329.           BIO_printf(bio_err, "\n");
330.       }

crypto/bn/bn_print.c:304:1: Parameter `a->top`
  302.   # endif
  303.   
  304. > int BN_print(BIO *bp, const BIGNUM *a)
  305.   {
  306.       int i, j, v, z = 0;

apps/s_client.c:332:9: Call
330.       }
331.   
332.       if (SRP_check_known_gN_param(g, N))
               ^
333.           return 1;
334.   

crypto/srp/srp_lib.c:255:1: Parameter `g->top`
  253.    * from the ietf-tls-srp draft version 8
  254.    */
  255. > char *SRP_check_known_gN_param(const BIGNUM *g, const BIGNUM *N)
  256.   {
  257.       size_t i;

apps/s_client.c:345:13: Call
343.            * has already been tested.
344.            */
345.           if (BN_num_bits(g) <= BN_BITS && srp_Verify_N_and_g(N, g))
                   ^
346.               return 1;
347.       }

crypto/bn/bn_lib.c:166:9: Call
  164.       bn_check_top(a);
  165.   
  166.       if (BN_is_zero(a))
                 ^
  167.           return 0;
  168.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));

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

apps/s_client.c:345:42: Call
343.            * has already been tested.
344.            */
345.           if (BN_num_bits(g) <= BN_BITS && srp_Verify_N_and_g(N, g))
                                                ^
346.               return 1;
347.       }

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

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

crypto/bn/bn_exp.c:89:1: Parameter `a->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 `a->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 `a->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:753:14: Call
        751.       /* prepare a^1 in Montgomery domain */
        752.       if (a->neg || BN_ucmp(a, m) >= 0) {
        753.           if (!BN_nnmod(&am, a, m, ctx))
                            ^
        754.               goto err;
        755.           if (!BN_to_montgomery(&am, &am, mont, ctx))

crypto/bn/bn_mod.c:13:1: Parameter `m->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 `num->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:204:11: Call
            202.       sdiv->neg = 0;
            203.       norm_shift += BN_BITS2;
            204.       if (!(BN_lshift(snum, num, norm_shift)))
                             ^
            205.           goto err;
            206.       snum->neg = 0;

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

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

crypto/bn/bn_shift.c:97:5: Assignment
              95.       }
              96.   
              97.       nw = n / BN_BITS2;
                         ^
              98.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
              99.           return 0;

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

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

crypto/bn/bn_shift.c:98:9: Call
              96.   
              97.       nw = n / BN_BITS2;
              98.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
                             ^
              99.           return 0;
              100.       r->neg = a->neg;

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

crypto/bn/bn_shift.c:104:5: Assignment
              102.       rb = BN_BITS2 - lb;
              103.       f = a->d;
              104.       t = r->d;
                         ^
              105.       t[a->top + nw] = 0;
              106.       if (lb == 0)

crypto/bn/bn_shift.c:112:13: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `srp_Verify_N_and_g` 
              110.           for (i = a->top - 1; i >= 0; i--) {
              111.               l = f[i];
              112.               t[nw + i + 1] |= (l >> rb) & BN_MASK2;
                                 ^
              113.               t[nw + i] = (l << lb) & BN_MASK2;
              114.           }
