summaryrefslogtreecommitdiff
path: root/net/tls/tls.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2023-02-06 18:22:27 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2023-02-13 18:34:48 +0800
commit8d338c76f7cfe0eb4bc46078b1c09c8c5fc75353 (patch)
tree3579d38207ecb2d73e718eeb92b080247d571d57 /net/tls/tls.h
parent1dbab1312254602175c805863eaace59ebf162ba (diff)
tls: Only use data field in crypto completion function
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>
Diffstat (limited to 'net/tls/tls.h')
-rw-r--r--net/tls/tls.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tls/tls.h b/net/tls/tls.h
index 0e840a0c3437..804c3880d028 100644
--- a/net/tls/tls.h
+++ b/net/tls/tls.h
@@ -70,6 +70,8 @@ struct tls_rec {
char content_type;
struct scatterlist sg_content_type;
+ struct sock *sk;
+
char aad_space[TLS_AAD_SPACE_SIZE];
u8 iv_data[MAX_IV_SIZE];
struct aead_request aead_req;