]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix DTLS handshake message size checks.
authorMatt Caswell <matt@openssl.org>
Fri, 6 Jun 2014 21:25:52 +0000 (14:25 -0700)
committerMatt Caswell <matt@openssl.org>
Wed, 6 Aug 2014 20:30:39 +0000 (21:30 +0100)
commit934ca0714a686673695c055de86064f423984477
treeb546232378d6c415cb627643a6d6b447c4e88de7
parentad007e0aaf07af7a3e6aa6b4436722639a1c2296
Fix DTLS handshake message size checks.

In |dtls1_reassemble_fragment|, the value of
|msg_hdr->frag_off+frag_len| was being checked against the maximum
handshake message size, but then |msg_len| bytes were allocated for the
fragment buffer. This means that so long as the fragment was within the
allowed size, the pending handshake message could consume 16MB + 2MB
(for the reassembly bitmap). Approx 10 outstanding handshake messages
are allowed, meaning that an attacker could consume ~180MB per DTLS
connection.

In the non-fragmented path (in |dtls1_process_out_of_seq_message|), no
check was applied.

Fixes CVE-2014-3506

Wholly based on patch by Adam Langley with one minor amendment.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
ssl/d1_both.c