summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjsing <>2021-09-03 13:18:17 +0000
committerjsing <>2021-09-03 13:18:17 +0000
commit149ab54a9d8d67404fd92901e45040db804e90d3 (patch)
tree3f87dc96c4c8c1b2869704c12dde06d97654975d /src/lib
parent0e1b29b0b5ebb370785e5e69e3b74e9affb817c2 (diff)
downloadopenbsd-149ab54a9d8d67404fd92901e45040db804e90d3.tar.gz
openbsd-149ab54a9d8d67404fd92901e45040db804e90d3.tar.bz2
openbsd-149ab54a9d8d67404fd92901e45040db804e90d3.zip
Ensure that a server hello does not have trailing data.
Found by tlsfuzzer. ok beck@
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/ssl_clnt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_clnt.c b/src/lib/libssl/ssl_clnt.c
index e27a0735b6..ddab394db9 100644
--- a/src/lib/libssl/ssl_clnt.c
+++ b/src/lib/libssl/ssl_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_clnt.c,v 1.110 2021/09/02 14:41:03 beck Exp $ */ 1/* $OpenBSD: ssl_clnt.c,v 1.111 2021/09/03 13:18:17 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -1065,6 +1065,9 @@ ssl3_get_server_hello(SSL *s)
1065 goto fatal_err; 1065 goto fatal_err;
1066 } 1066 }
1067 1067
1068 if (CBS_len(&cbs) != 0)
1069 goto decode_err;
1070
1068 /* 1071 /*
1069 * Determine if we need to see RI. Strictly speaking if we want to 1072 * Determine if we need to see RI. Strictly speaking if we want to
1070 * avoid an attack we should *always* see RI even on initial server 1073 * avoid an attack we should *always* see RI even on initial server