apps/s_client.c:340: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `srp_Verify_N_and_g`.
Showing all 27 steps of the trace


apps/s_client.c:321:9: Call
319.           BIO_printf(bio_err, "SRP parameters:\n");
320.           BIO_printf(bio_err, "\tN=");
321.           BN_print(bio_err, N);
               ^
322.           BIO_printf(bio_err, "\n\tg=");
323.           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:323:9: Call
321.           BN_print(bio_err, N);
322.           BIO_printf(bio_err, "\n\tg=");
323.           BN_print(bio_err, g);
               ^
324.           BIO_printf(bio_err, "\n");
325.       }

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:327:9: Call
325.       }
326.   
327.       if (SRP_check_known_gN_param(g, N))
               ^
328.           return 1;
329.   

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

apps/s_client.c:340:13: Call
338.            * has already been tested.
339.            */
340.           if (BN_num_bits(g) <= BN_BITS && srp_Verify_N_and_g(N, g))
                   ^
341.               return 1;
342.       }

crypto/bn/bn_lib.c:139:9: Call
  137.       bn_check_top(a);
  138.   
  139.       if (BN_is_zero(a))
                 ^
  140.           return 0;
  141.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));

crypto/bn/bn_lib.c:814:1: Parameter `a->top`
    812.   }
    813.   
    814. > int BN_is_zero(const BIGNUM *a)
    815.   {
    816.       return a->top == 0;

apps/s_client.c:340:42: Call
338.            * has already been tested.
339.            */
340.           if (BN_num_bits(g) <= BN_BITS && srp_Verify_N_and_g(N, g))
                                                ^
341.               return 1;
342.       }

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

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

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:354:14: Call
      352.   
      353.       if (a->neg || BN_ucmp(a, m) >= 0) {
      354.           if (!BN_nnmod(val[0], a, m, ctx))
                          ^
      355.               goto err;
      356.           aa = val[0];

crypto/bn/bn_mod.c:13:1: Parameter `*r->d`
        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 `*rm->d`
          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:182:17: Call
          180.       if (!no_branch && BN_ucmp(num, divisor) < 0) {
          181.           if (rm != NULL) {
          182.               if (BN_copy(rm, num) == NULL)
                                 ^
          183.                   return 0;
          184.           }

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:910:1: Parameter `*a->d`
              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:295:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `srp_Verify_N_and_g` 
            293.   
            294.       if (b->top > 0)
            295.           memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                           ^
            296.   
            297.       a->top = b->top;
