ssl/statem/statem_srvr.c:2449: error: BUFFER_OVERRUN_L3
  Offset: [16, +oo] (⇐ 1 + [15, +oo]) Size: [0, 8388607] by call to `srp_generate_server_master_secret`.
Showing all 27 steps of the trace


ssl/statem/statem_srvr.c:2431:29: Call
2429.               goto f_err;
2430.           }
2431.           if ((s->srp_ctx.A = BN_bin2bn(data, i, NULL)) == NULL) {
                                    ^
2432.               SSLerr(SSL_F_TLS_PROCESS_CLIENT_KEY_EXCHANGE, ERR_R_BN_LIB);
2433.               goto err;

crypto/bn/bn_lib.c:549:9: Assignment
  547.       n = len;
  548.       if (n == 0) {
  549.           ret->top = 0;
                 ^
  550.           return (ret);
  551.       }

ssl/statem/statem_srvr.c:2449:14: Call
2447.           }
2448.   
2449.           if (!srp_generate_server_master_secret(s)) {
                     ^
2450.               SSLerr(SSL_F_TLS_PROCESS_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR);
2451.               goto err;

ssl/tls_srp.c:334:1: Parameter `s->srp_ctx.A->top`
  332.   }
  333.   
  334. > int srp_generate_server_master_secret(SSL *s)
  335.   {
  336.       BIGNUM *K = NULL, *u = NULL;

ssl/tls_srp.c:340:10: Call
  338.       unsigned char *tmp = NULL;
  339.   
  340.       if (!SRP_Verify_A_mod_N(s->srp_ctx.A, s->srp_ctx.N))
                  ^
  341.           goto err;
  342.       if ((u = SRP_Calc_u(s->srp_ctx.A, s->srp_ctx.B, s->srp_ctx.N)) == NULL)

crypto/srp/srp_lib.c:317:1: Parameter `A->top`
    315.   }
    316.   
    317. > int SRP_Verify_A_mod_N(BIGNUM *A, BIGNUM *N)
    318.   {
    319.       /* Checks if A % N == 0 */

crypto/srp/srp_lib.c:320:12: Call
    318.   {
    319.       /* Checks if A % N == 0 */
    320.       return SRP_Verify_B_mod_N(A, N);
                      ^
    321.   }
    322.   

crypto/srp/srp_lib.c:296:1: Parameter `B->top`
      294.   }
      295.   
      296. > int SRP_Verify_B_mod_N(BIGNUM *B, BIGNUM *N)
      297.   {
      298.       BIGNUM *r;

ssl/tls_srp.c:342:14: Call
  340.       if (!SRP_Verify_A_mod_N(s->srp_ctx.A, s->srp_ctx.N))
  341.           goto err;
  342.       if ((u = SRP_Calc_u(s->srp_ctx.A, s->srp_ctx.B, s->srp_ctx.N)) == NULL)
                      ^
  343.           goto err;
  344.       if ((K = SRP_Calc_server_key(s->srp_ctx.A, s->srp_ctx.v, u, s->srp_ctx.b,

crypto/srp/srp_lib.c:104:1: Parameter `A->top`
    102.   }
    103.   
    104. > BIGNUM *SRP_Calc_u(BIGNUM *A, BIGNUM *B, BIGNUM *N)
    105.   {
    106.       /* k = SHA1(PAD(A) || PAD(B) ) -- tls-srp draft 8 */

ssl/tls_srp.c:344:14: Call
  342.       if ((u = SRP_Calc_u(s->srp_ctx.A, s->srp_ctx.B, s->srp_ctx.N)) == NULL)
  343.           goto err;
  344.       if ((K = SRP_Calc_server_key(s->srp_ctx.A, s->srp_ctx.v, u, s->srp_ctx.b,
                      ^
  345.                                    s->srp_ctx.N)) == NULL)
  346.           goto err;

crypto/srp/srp_lib.c:147:1: Parameter `A->top`
    145.   }
    146.   
    147. > BIGNUM *SRP_Calc_server_key(BIGNUM *A, BIGNUM *v, BIGNUM *u, BIGNUM *b,
    148.                               BIGNUM *N)
    149.   {

crypto/srp/srp_lib.c:164:10: Call
    162.       if (!BN_mod_exp(tmp, v, u, N, bn_ctx))
    163.           goto err;
    164.       if (!BN_mod_mul(tmp, A, tmp, N, bn_ctx))
                    ^
    165.           goto err;
    166.       if (!BN_mod_exp(S, tmp, b, N, bn_ctx))

crypto/bn/bn_mod.c:178:1: Parameter `a->top`
      176.   
      177.   /* slow but works */
      178. > int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
      179.                  BN_CTX *ctx)
      180.   {

crypto/bn/bn_mod.c:192:14: Call
      190.           goto err;
      191.       if (a == b) {
      192.           if (!BN_sqr(t, a, ctx))
                          ^
      193.               goto err;
      194.       } else {

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

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

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

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

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

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

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

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

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

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

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

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