]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tls: wait for pending async decryptions if tls_strp_msg_hold fails
authorSabrina Dubroca <sd@queasysnail.net>
Tue, 14 Oct 2025 09:16:59 +0000 (11:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2025 13:04:33 +0000 (14:04 +0100)
commit9f83fd0c179e0f458e824e417f9d5ad53443f685
treef82f372cfc701b86e94c5cf8903f9c28c033b6ed
parent9779f64914d07730d030bd473c0901255812987b
tls: wait for pending async decryptions if tls_strp_msg_hold fails

[ Upstream commit b8a6ff84abbcbbc445463de58704686011edc8e1 ]

Async decryption calls tls_strp_msg_hold to create a clone of the
input skb to hold references to the memory it uses. If we fail to
allocate that clone, proceeding with async decryption can lead to
various issues (UAF on the skb, writing into userspace memory after
the recv() call has returned).

In this case, wait for all pending decryption requests.

Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser")
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://patch.msgid.link/b9fe61dcc07dab15da9b35cf4c7d86382a98caf2.1760432043.git.sd@queasysnail.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/tls/tls_sw.c