ssl/tls_srp.c:259: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `SRP_Calc_server_key`.
Showing all 28 steps of the trace


ssl/tls_srp.c:249:1: Parameter `s->srp_ctx.N->top`
247.   }
248.   
249. > int srp_generate_server_master_secret(SSL *s)
250.   {
251.       BIGNUM *K = NULL, *u = NULL;

ssl/tls_srp.c:255:10: Call
253.       unsigned char *tmp = NULL;
254.   
255.       if (!SRP_Verify_A_mod_N(s->srp_ctx.A, s->srp_ctx.N))
                ^
256.           goto err;
257.       if ((u = SRP_Calc_u(s->srp_ctx.A, s->srp_ctx.B, s->srp_ctx.N)) == NULL)

crypto/srp/srp_lib.c:239:1: Parameter `N->top`
  237.   }
  238.   
  239. > int SRP_Verify_A_mod_N(const BIGNUM *A, const BIGNUM *N)
  240.   {
  241.       /* Checks if A % N == 0 */

crypto/srp/srp_lib.c:242:12: Call
  240.   {
  241.       /* Checks if A % N == 0 */
  242.       return SRP_Verify_B_mod_N(A, N);
                    ^
  243.   }
  244.   

crypto/srp/srp_lib.c:218:1: Parameter `N->top`
    216.   }
    217.   
    218. > int SRP_Verify_B_mod_N(const BIGNUM *B, const BIGNUM *N)
    219.   {
    220.       BIGNUM *r;

ssl/tls_srp.c:257:14: Call
255.       if (!SRP_Verify_A_mod_N(s->srp_ctx.A, s->srp_ctx.N))
256.           goto err;
257.       if ((u = SRP_Calc_u(s->srp_ctx.A, s->srp_ctx.B, s->srp_ctx.N)) == NULL)
                    ^
258.           goto err;
259.       if ((K = SRP_Calc_server_key(s->srp_ctx.A, s->srp_ctx.v, u, s->srp_ctx.b,

crypto/srp/srp_lib.c:52:1: Parameter `N->top`
  50.   }
  51.   
  52. > BIGNUM *SRP_Calc_u(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N)
  53.   {
  54.       /* u = SHA1(PAD(A) || PAD(B) ) -- tls-srp RFC 5054 */

crypto/srp/srp_lib.c:55:12: Call
  53.   {
  54.       /* u = SHA1(PAD(A) || PAD(B) ) -- tls-srp RFC 5054 */
  55.       return srp_Calc_xy(A, B, N);
                   ^
  56.   }
  57.   

crypto/srp/srp_lib.c:23:1: Parameter `N->top`
    21.   /* calculate = SHA1(PAD(x) || PAD(y)) */
    22.   
    23. > static BIGNUM *srp_Calc_xy(const BIGNUM *x, const BIGNUM *y, const BIGNUM *N)
    24.   {
    25.       unsigned char digest[SHA_DIGEST_LENGTH];

crypto/srp/srp_lib.c:27:16: Call
    25.       unsigned char digest[SHA_DIGEST_LENGTH];
    26.       unsigned char *tmp = NULL;
    27.       int numN = BN_num_bytes(N);
                         ^
    28.       BIGNUM *res = NULL;
    29.   

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

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

ssl/tls_srp.c:259:14: Call
257.       if ((u = SRP_Calc_u(s->srp_ctx.A, s->srp_ctx.B, s->srp_ctx.N)) == NULL)
258.           goto err;
259.       if ((K = SRP_Calc_server_key(s->srp_ctx.A, s->srp_ctx.v, u, s->srp_ctx.b,
                    ^
260.                                    s->srp_ctx.N)) == NULL)
261.           goto err;

crypto/srp/srp_lib.c:58:1: Parameter `N->top`
  56.   }
  57.   
  58. > BIGNUM *SRP_Calc_server_key(const BIGNUM *A, const BIGNUM *v, const BIGNUM *u,
  59.                               const BIGNUM *b, const BIGNUM *N)
  60.   {

crypto/srp/srp_lib.c:72:10: Call
  70.       /* S = (A*v**u) ** b */
  71.   
  72.       if (!BN_mod_exp(tmp, v, u, N, bn_ctx))
                 ^
  73.           goto err;
  74.       if (!BN_mod_mul(tmp, A, tmp, N, bn_ctx))

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:858:1: Parameter `a->top`
      856.   }
      857.   
      858. > int BN_is_odd(const BIGNUM *a)
      859.   {
      860.       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:200:14: Call
      198.       if (m->neg) {
      199.           /* ignore sign of 'm' */
      200.           if (!BN_copy(aa, m))
                          ^
      201.               goto err;
      202.           aa->neg = 0;

crypto/bn/bn_lib.c:281:1: <Offset trace>
279.   }
280.   
281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
282.   {
283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: Parameter `b->top`
        279.   }
        280.   
        281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
        282.   {
        283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: <Length trace>
279.   }
280.   
281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
282.   {
283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: Parameter `*a->d`
        279.   }
        280.   
        281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
        282.   {
        283.       bn_check_top(b);

crypto/bn/bn_lib.c:287:9: Call
        285.       if (a == b)
        286.           return a;
        287.       if (bn_wexpand(a, b->top) == NULL)
                       ^
        288.           return NULL;
        289.   

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

crypto/bn/bn_lib.c:291:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `SRP_Calc_server_key` 
        289.   
        290.       if (b->top > 0)
        291.           memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                       ^
        292.   
        293.       a->neg = b->neg;
