ssl/tls_srp.c:259: error: BUFFER_OVERRUN_L3
  Offset: [2, 15] (⇐ 1 + [1, 14]) Size: [0, 8388607] by call to `SRP_Calc_server_key`.
Showing all 28 steps of the trace


ssl/tls_srp.c:249:1: Parameter `s->srp_ctx.A->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:237:1: Parameter `A->top`
  235.   }
  236.   
  237. > int SRP_Verify_A_mod_N(const BIGNUM *A, const BIGNUM *N)
  238.   {
  239.       /* Checks if A % N == 0 */

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

crypto/srp/srp_lib.c:216:1: Parameter `B->top`
    214.   }
    215.   
    216. > int SRP_Verify_B_mod_N(const BIGNUM *B, const BIGNUM *N)
    217.   {
    218.       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:51:1: Parameter `A->top`
  49.   }
  50.   
  51. > BIGNUM *SRP_Calc_u(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N)
  52.   {
  53.       /* k = SHA1(PAD(A) || PAD(B) ) -- tls-srp draft 8 */

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

crypto/srp/srp_lib.c:23:1: Parameter `x->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];

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:57:1: Parameter `A->top`
  55.   }
  56.   
  57. > BIGNUM *SRP_Calc_server_key(const BIGNUM *A, const BIGNUM *v, const BIGNUM *u,
  58.                               const BIGNUM *b, const BIGNUM *N)
  59.   {

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

crypto/bn/bn_mod.c:193:1: Parameter `a->top`
    191.   
    192.   /* slow but works */
    193. > int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
    194.                  BN_CTX *ctx)
    195.   {

crypto/bn/bn_mod.c:207:14: Call
    205.           goto err;
    206.       if (a == b) {
    207.           if (!BN_sqr(t, a, ctx))
                        ^
    208.               goto err;
    209.       } else {

crypto/bn/bn_sqr.c:17:1: Parameter `*r->d`
      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 ret = bn_sqr_fixed_top(r, a, ctx);

crypto/bn/bn_sqr.c:19:15: Call
      17.   int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
      18.   {
      19.       int ret = bn_sqr_fixed_top(r, a, ctx);
                          ^
      20.   
      21.       bn_correct_top(r);

crypto/bn/bn_sqr.c:27:1: Parameter `a->top`
        25.   }
        26.   
        27. > int bn_sqr_fixed_top(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
        28.   {
        29.       int max, al;

crypto/bn/bn_sqr.c:35:5: Assignment
        33.       bn_check_top(a);
        34.   
        35.       al = a->top;
                  ^
        36.       if (al <= 0) {
        37.           r->top = 0;

crypto/bn/bn_sqr.c:70:13: Call
        68.           if (al < BN_SQR_RECURSIVE_SIZE_NORMAL) {
        69.               BN_ULONG t[BN_SQR_RECURSIVE_SIZE_NORMAL * 2];
        70.               bn_sqr_normal(rr->d, a->d, al, t);
                          ^
        71.           } else {
        72.               int j, k;

crypto/bn/bn_sqr.c:109:1: <Offset trace>
107.   
108.   /* tmp must have 2*n words */
109. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
110.   {
111.       int i, j, max;

crypto/bn/bn_sqr.c:109:1: Parameter `n`
          107.   
          108.   /* tmp must have 2*n words */
          109. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
          110.   {
          111.       int i, j, max;

crypto/bn/bn_sqr.c:120:5: Assignment
          118.       rp[0] = rp[max - 1] = 0;
          119.       rp++;
          120.       j = n;
                     ^
          121.   
          122.       if (--j > 0) {

crypto/bn/bn_sqr.c:122:9: Assignment
          120.       j = n;
          121.   
          122.       if (--j > 0) {
                         ^
          123.           ap++;
          124.           rp[j] = bn_mul_words(rp, ap, j, ap[-1]);

crypto/bn/bn_sqr.c:109:1: <Length trace>
107.   
108.   /* tmp must have 2*n words */
109. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
110.   {
111.       int i, j, max;

crypto/bn/bn_sqr.c:109:1: Parameter `*r`
          107.   
          108.   /* tmp must have 2*n words */
          109. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
          110.   {
          111.       int i, j, max;

crypto/bn/bn_sqr.c:117:5: Assignment
          115.       max = n * 2;
          116.       ap = a;
          117.       rp = r;
                     ^
          118.       rp[0] = rp[max - 1] = 0;
          119.       rp++;

crypto/bn/bn_sqr.c:119:5: Assignment
          117.       rp = r;
          118.       rp[0] = rp[max - 1] = 0;
          119.       rp++;
                     ^
          120.       j = n;
          121.   

crypto/bn/bn_sqr.c:124:9: Array access: Offset: [2, 15] (⇐ 1 + [1, 14]) Size: [0, 8388607] by call to `SRP_Calc_server_key` 
          122.       if (--j > 0) {
          123.           ap++;
          124.           rp[j] = bn_mul_words(rp, ap, j, ap[-1]);
                         ^
          125.           rp += 2;
          126.       }
