apps/s_client.c:388: error: BUFFER_OVERRUN_L3
  Offset: [16, +oo] (⇐ 1 + [15, +oo]) Size: [0, 8388607] by call to `srp_Verify_N_and_g`.
Showing all 34 steps of the trace


apps/s_client.c:369:9: Call
367.           BIO_printf(bio_err, "SRP parameters:\n");
368.           BIO_printf(bio_err, "\tN=");
369.           BN_print(bio_err, N);
               ^
370.           BIO_printf(bio_err, "\n\tg=");
371.           BN_print(bio_err, g);

crypto/bn/bn_print.c:340:1: Parameter `a->top`
  338.   # endif
  339.   
  340. > int BN_print(BIO *bp, const BIGNUM *a)
  341.   {
  342.       int i, j, v, z = 0;

apps/s_client.c:371:9: Call
369.           BN_print(bio_err, N);
370.           BIO_printf(bio_err, "\n\tg=");
371.           BN_print(bio_err, g);
               ^
372.           BIO_printf(bio_err, "\n");
373.       }

crypto/bn/bn_print.c:340:1: Parameter `a->top`
  338.   # endif
  339.   
  340. > int BN_print(BIO *bp, const BIGNUM *a)
  341.   {
  342.       int i, j, v, z = 0;

apps/s_client.c:375:9: Call
373.       }
374.   
375.       if (SRP_check_known_gN_param(g, N))
               ^
376.           return 1;
377.   

crypto/srp/srp_lib.c:340:1: Parameter `g->top`
  338.    * from the ietf-tls-srp draft version 8
  339.    */
  340. > char *SRP_check_known_gN_param(BIGNUM *g, BIGNUM *N)
  341.   {
  342.       size_t i;

apps/s_client.c:388:13: Call
386.            * has already been tested.
387.            */
388.           if (BN_num_bits(g) <= BN_BITS && srp_Verify_N_and_g(N, g))
                   ^
389.               return 1;
390.       }

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

crypto/bn/bn_lib.c:899:1: Parameter `a->top`
    897.   }
    898.   
    899. > int BN_is_zero(const BIGNUM *a)
    900.   {
    901.       return a->top == 0;

apps/s_client.c:388:42: Call
386.            * has already been tested.
387.            */
388.           if (BN_num_bits(g) <= BN_BITS && srp_Verify_N_and_g(N, g))
                                                ^
389.               return 1;
390.       }

apps/s_client.c:321:1: Parameter `g->top`
  319.   # define SRP_NUMBER_ITERATIONS_FOR_PRIME 64
  320.   
  321. > static int srp_Verify_N_and_g(const BIGNUM *N, const BIGNUM *g)
  322.   {
  323.       BN_CTX *bn_ctx = BN_CTX_new();

apps/s_client.c:334:9: Call
  332.           r != NULL &&
  333.           /* verify g^((N-1)/2) == -1 (mod N) */
  334.           BN_mod_exp(r, g, p, N, bn_ctx) &&
                 ^
  335.           BN_add_word(r, 1) && BN_cmp(r, N) == 0;
  336.   

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

crypto/bn/bn_exp.c:251:19: Call
    249.           } else
    250.   # endif
    251.               ret = BN_mod_exp_mont(r, a, p, m, ctx, NULL);
                             ^
    252.       } else
    253.   #endif

crypto/bn/bn_exp.c:401:1: Parameter `a->top`
      399.   }
      400.   
      401. > int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
      402.                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
      403.   {

crypto/bn/bn_exp.c:413:16: Call
      411.   
      412.       if (BN_get_flags(p, BN_FLG_CONSTTIME) != 0) {
      413.           return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
                            ^
      414.       }
      415.   

crypto/bn/bn_exp.c:655:1: Parameter `a->top`
        653.    * http://www.daemonology.net/hyperthreading-considered-harmful/)
        654.    */
        655. > int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
        656.                                 const BIGNUM *m, BN_CTX *ctx,
        657.                                 BN_MONT_CTX *in_mont)

crypto/bn/bn_exp.c:812:17: Call
        810.           if (!BN_to_montgomery(&am, &am, mont, ctx))
        811.               goto err;
        812.       } else if (!BN_to_montgomery(&am, a, mont, ctx))
                               ^
        813.           goto err;
        814.   

crypto/bn/bn_lib.c:924:1: Parameter `a->top`
          922.   }
          923.   
          924. > int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
          925.                        BN_CTX *ctx)
          926.   {

crypto/bn/bn_lib.c:927:12: Call
          925.                        BN_CTX *ctx)
          926.   {
          927.       return BN_mod_mul_montgomery(r, a, &(mont->RR), mont, ctx);
                            ^
          928.   }
          929.   

crypto/bn/bn_mont.c:128:1: Parameter `a->top`
            126.   #endif
            127.   
            128. > int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
            129.                             BN_MONT_CTX *mont, BN_CTX *ctx)
            130.   {

crypto/bn/bn_mont.c:155:14: Call
            153.       bn_check_top(tmp);
            154.       if (a == b) {
            155.           if (!BN_sqr(tmp, a, ctx))
                                ^
            156.               goto err;
            157.       } else {

crypto/bn/bn_sqr.c:66:1: Parameter `a->top`
              64.    * I've just gone over this and it is now %20 faster on x86 - eay - 27 Jun 96
              65.    */
              66. > int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
              67.   {
              68.       int max, al;

crypto/bn/bn_sqr.c:74:5: Assignment
              72.       bn_check_top(a);
              73.   
              74.       al = a->top;
                        ^
              75.       if (al <= 0) {
              76.           r->top = 0;

crypto/bn/bn_sqr.c:123:17: Call
              121.                   if (bn_wexpand(tmp, max) == NULL)
              122.                       goto err;
              123.                   bn_sqr_normal(rr->d, a->d, al, tmp->d);
                                     ^
              124.               }
              125.           }

crypto/bn/bn_sqr.c:153:1: <Offset trace>
151.   
152.   /* tmp must have 2*n words */
153. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
154.   {
155.       int i, j, max;

crypto/bn/bn_sqr.c:153:1: Parameter `n`
                151.   
                152.   /* tmp must have 2*n words */
                153. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
                154.   {
                155.       int i, j, max;

crypto/bn/bn_sqr.c:164:5: Assignment
                162.       rp[0] = rp[max - 1] = 0;
                163.       rp++;
                164.       j = n;
                           ^
                165.   
                166.       if (--j > 0) {

crypto/bn/bn_sqr.c:166:9: Assignment
                164.       j = n;
                165.   
                166.       if (--j > 0) {
                               ^
                167.           ap++;
                168.           rp[j] = bn_mul_words(rp, ap, j, ap[-1]);

crypto/bn/bn_sqr.c:153:1: <Length trace>
151.   
152.   /* tmp must have 2*n words */
153. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
154.   {
155.       int i, j, max;

crypto/bn/bn_sqr.c:153:1: Parameter `*r`
                151.   
                152.   /* tmp must have 2*n words */
                153. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
                154.   {
                155.       int i, j, max;

crypto/bn/bn_sqr.c:161:5: Assignment
                159.       max = n * 2;
                160.       ap = a;
                161.       rp = r;
                           ^
                162.       rp[0] = rp[max - 1] = 0;
                163.       rp++;

crypto/bn/bn_sqr.c:163:5: Assignment
                161.       rp = r;
                162.       rp[0] = rp[max - 1] = 0;
                163.       rp++;
                           ^
                164.       j = n;
                165.   

crypto/bn/bn_sqr.c:168:9: Array access: Offset: [16, +oo] (⇐ 1 + [15, +oo]) Size: [0, 8388607] by call to `srp_Verify_N_and_g` 
                166.       if (--j > 0) {
                167.           ap++;
                168.           rp[j] = bn_mul_words(rp, ap, j, ap[-1]);
                               ^
                169.           rp += 2;
                170.       }
