]> git.ipfire.org Git - thirdparty/openssl.git/commit
zero data in hm_fragment on alloc
authorNeil Horman <nhorman@openssl.org>
Thu, 9 Nov 2023 13:13:58 +0000 (08:13 -0500)
committerMatt Caswell <matt@openssl.org>
Fri, 24 Nov 2023 10:56:33 +0000 (10:56 +0000)
commit29406e10311380d9d1fb3105b33039685ff6f507
tree88fa413c3bf5c9b9b4a7f3b0596c72a5dec36688
parent48fe8d4e53d5572ff77215e3336a1c71b0b4517b
zero data in hm_fragment on alloc

if we allocate a new hm_frament in dtls1_buffer_message with
dtls1_hm_fragment_new, the returned fragment contains uninitalized data in the
msg_header field.  If an error then occurs, and we free the fragment,
dtls_hm_fragment_free interrogates the msg_header field (which is garbage), and
potentially references undefined values, or worse, accidentally references
available memory that is not owned, leading to various corruptions.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2261)

(cherry picked from commit 02a2c3bc1336d2af1601fbc5d959c6babc1bce12)
ssl/statem/statem_dtls.c