]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tls: Only use data field in crypto completion function
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 6 Feb 2023 10:22:27 +0000 (18:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:51:52 +0000 (11:51 +0100)
commit8ae187386420c4d8366cfab812bb6478fcfcdd59
treedc7708551e46b345685c3795743bd96b20c9f271
parent65e65a8b2de4b617b908c89538179aa92c94203a
tls: Only use data field in crypto completion function

[ Upstream commit 8d338c76f7cfe0eb4bc46078b1c09c8c5fc75353 ]

The crypto_async_request passed to the completion is not guaranteed
to be the original request object.  Only the data field can be relied
upon.

Fix this by storing the socket pointer with the AEAD request.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Stable-dep-of: a2713257ee2b ("tls: Use size_add() in call to struct_size()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/tls/tls.h
net/tls/tls_sw.c