Skip to content

Commit c5590a6

Browse files
syzzercron2
authored andcommitted
Drop too-short control channel packets instead of asserting out.
This fixes a denial-of-service vulnerability where an authenticated client could stop the server by triggering a server-side ASSERT(). OpenVPN would previously ASSERT() that control channel packets have a payload of at least 4 bytes. An authenticated client could trigger this assert by sending a too-short control channel packet to the server. Thanks to Dragana Damjanovic for reporting the issue. This bug has been assigned CVE-2014-8104. Signed-off-by: Steffan Karger <steffan.karger@fox-it.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <1CED409804E2164C8104F9E623B08B9018803B0FE7@FOXDFT02.FOX.local> Signed-off-by: Gert Doering <gert@greenie.muc.de>
1 parent 65eedc3 commit c5590a6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/openvpn/ssl.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2036,7 +2036,11 @@ key_method_2_read (struct buffer *buf, struct tls_multi *multi, struct tls_sessi
20362036
ASSERT (session->opt->key_method == 2);
20372037

20382038
/* discard leading uint32 */
2039-
ASSERT (buf_advance (buf, 4));
2039+
if (!buf_advance (buf, 4)) {
2040+
msg (D_TLS_ERRORS, "TLS ERROR: Plaintext buffer too short (%d bytes).",
2041+
buf->len);
2042+
goto error;
2043+
}
20402044

20412045
/* get key method */
20422046
key_method_flags = buf_read_u8 (buf);

0 commit comments

Comments
 (0)