]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tls: separate no-async decryption request handling from async
authorSabrina Dubroca <sd@queasysnail.net>
Wed, 28 Feb 2024 22:43:59 +0000 (23:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Mar 2024 14:48:37 +0000 (14:48 +0000)
commitdec5b6e7b211e405d3bcb504562ab21aa7e5a64d
tree820b6401be4fd189f1c4e63d9fb472ea2a289bc1
parent11121c2ce571408997508cb0814cacdf81dfa5ca
tls: separate no-async decryption request handling from async

[ Upstream commit 41532b785e9d79636b3815a64ddf6a096647d011 ]

If we're not doing async, the handling is much simpler. There's no
reference counting, we just need to wait for the completion to wake us
up and return its result.

We should preferably also use a separate crypto_wait. I'm not seeing a
UAF as I did in the past, I think aec7961916f3 ("tls: fix race between
async notify and socket close") took care of it.

This will make the next fix easier.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://lore.kernel.org/r/47bde5f649707610eaef9f0d679519966fc31061.1709132643.git.sd@queasysnail.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 13114dc55430 ("tls: fix use-after-free on failed backlog decryption")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/tls/tls_sw.c