ssl/statem/statem_srvr.c:2421: 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:2404:25: Call
2402.           return 0;
2403.       }
2404.       if ((s->srp_ctx.A = BN_bin2bn(data, i, NULL)) == NULL) {
                                ^
2405.           SSLerr(SSL_F_TLS_PROCESS_CKE_SRP, ERR_R_BN_LIB);
2406.           return 0;

crypto/bn/bn_lib.c:492:9: Assignment
  490.       n = len;
  491.       if (n == 0) {
  492.           ret->top = 0;
                 ^
  493.           return (ret);
  494.       }

ssl/statem/statem_srvr.c:2421:10: Call
2419.       }
2420.   
2421.       if (!srp_generate_server_master_secret(s)) {
                 ^
2422.           SSLerr(SSL_F_TLS_PROCESS_CKE_SRP, ERR_R_INTERNAL_ERROR);
2423.           return 0;

ssl/tls_srp.c:284:1: Parameter `s->srp_ctx.A->top`
  282.   }
  283.   
  284. > int srp_generate_server_master_secret(SSL *s)
  285.   {
  286.       BIGNUM *K = NULL, *u = NULL;

ssl/tls_srp.c:290:10: Call
  288.       unsigned char *tmp = NULL;
  289.   
  290.       if (!SRP_Verify_A_mod_N(s->srp_ctx.A, s->srp_ctx.N))
                  ^
  291.           goto err;
  292.       if ((u = SRP_Calc_u(s->srp_ctx.A, s->srp_ctx.B, s->srp_ctx.N)) == NULL)

crypto/srp/srp_lib.c:281:1: Parameter `A->top`
    279.   }
    280.   
    281. > int SRP_Verify_A_mod_N(const BIGNUM *A, const BIGNUM *N)
    282.   {
    283.       /* Checks if A % N == 0 */

crypto/srp/srp_lib.c:284:12: Call
    282.   {
    283.       /* Checks if A % N == 0 */
    284.       return SRP_Verify_B_mod_N(A, N);
                      ^
    285.   }
    286.   

crypto/srp/srp_lib.c:260:1: Parameter `B->top`
      258.   }
      259.   
      260. > int SRP_Verify_B_mod_N(const BIGNUM *B, const BIGNUM *N)
      261.   {
      262.       BIGNUM *r;

ssl/tls_srp.c:292:14: Call
  290.       if (!SRP_Verify_A_mod_N(s->srp_ctx.A, s->srp_ctx.N))
  291.           goto err;
  292.       if ((u = SRP_Calc_u(s->srp_ctx.A, s->srp_ctx.B, s->srp_ctx.N)) == NULL)
                      ^
  293.           goto err;
  294.       if ((K = SRP_Calc_server_key(s->srp_ctx.A, s->srp_ctx.v, u, s->srp_ctx.b,

crypto/srp/srp_lib.c:58:1: Parameter `A->top`
    56.   }
    57.   
    58. > BIGNUM *SRP_Calc_u(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N)
    59.   {
    60.       /* k = SHA1(PAD(A) || PAD(B) ) -- tls-srp draft 8 */

ssl/tls_srp.c:294:14: Call
  292.       if ((u = SRP_Calc_u(s->srp_ctx.A, s->srp_ctx.B, s->srp_ctx.N)) == NULL)
  293.           goto err;
  294.       if ((K = SRP_Calc_server_key(s->srp_ctx.A, s->srp_ctx.v, u, s->srp_ctx.b,
                      ^
  295.                                    s->srp_ctx.N)) == NULL)
  296.           goto err;

crypto/srp/srp_lib.c:103:1: Parameter `A->top`
    101.   }
    102.   
    103. > BIGNUM *SRP_Calc_server_key(const BIGNUM *A, const BIGNUM *v, const BIGNUM *u,
    104.                               const BIGNUM *b, const BIGNUM *N)
    105.   {

crypto/srp/srp_lib.c:119:10: Call
    117.       if (!BN_mod_exp(tmp, v, u, N, bn_ctx))
    118.           goto err;
    119.       if (!BN_mod_mul(tmp, A, tmp, N, bn_ctx))
                    ^
    120.           goto err;
    121.   

crypto/bn/bn_mod.c:73:1: Parameter `a->top`
      71.   
      72.   /* slow but works */
      73. > int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
      74.                  BN_CTX *ctx)
      75.   {

crypto/bn/bn_mod.c:87:14: Call
      85.           goto err;
      86.       if (a == b) {
      87.           if (!BN_sqr(t, a, ctx))
                         ^
      88.               goto err;
      89.       } else {

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

crypto/bn/bn_sqr.c:25:5: Assignment
        23.       bn_check_top(a);
        24.   
        25.       al = a->top;
                  ^
        26.       if (al <= 0) {
        27.           r->top = 0;

crypto/bn/bn_sqr.c:74:17: Call
        72.                   if (bn_wexpand(tmp, max) == NULL)
        73.                       goto err;
        74.                   bn_sqr_normal(rr->d, a->d, al, tmp->d);
                              ^
        75.               }
        76.           }

crypto/bn/bn_sqr.c:104:1: <Offset trace>
102.   
103.   /* tmp must have 2*n words */
104. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
105.   {
106.       int i, j, max;

crypto/bn/bn_sqr.c:104:1: Parameter `n`
          102.   
          103.   /* tmp must have 2*n words */
          104. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
          105.   {
          106.       int i, j, max;

crypto/bn/bn_sqr.c:115:5: Assignment
          113.       rp[0] = rp[max - 1] = 0;
          114.       rp++;
          115.       j = n;
                     ^
          116.   
          117.       if (--j > 0) {

crypto/bn/bn_sqr.c:117:9: Assignment
          115.       j = n;
          116.   
          117.       if (--j > 0) {
                         ^
          118.           ap++;
          119.           rp[j] = bn_mul_words(rp, ap, j, ap[-1]);

crypto/bn/bn_sqr.c:104:1: <Length trace>
102.   
103.   /* tmp must have 2*n words */
104. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
105.   {
106.       int i, j, max;

crypto/bn/bn_sqr.c:104:1: Parameter `*r`
          102.   
          103.   /* tmp must have 2*n words */
          104. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
          105.   {
          106.       int i, j, max;

crypto/bn/bn_sqr.c:112:5: Assignment
          110.       max = n * 2;
          111.       ap = a;
          112.       rp = r;
                     ^
          113.       rp[0] = rp[max - 1] = 0;
          114.       rp++;

crypto/bn/bn_sqr.c:114:5: Assignment
          112.       rp = r;
          113.       rp[0] = rp[max - 1] = 0;
          114.       rp++;
                     ^
          115.       j = n;
          116.   

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