summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDave Watson <davejwatson@fb.com>2019-01-27 00:57:38 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-06 17:27:38 +0100
commitcb77e08da85fba41c646795d1865df2fdff59a90 (patch)
tree055903ccdc15db61bc9602829db385265aeeb69a /include
parent2c293753e4e7f6d82fdd565d18484189c1fe7f50 (diff)
net: tls: Save iv in tls_rec for async crypto requests
[ Upstream commit 32eb67b93c9e3cd62cb423e30b090cdd4aa8d275 ] aead_request_set_crypt takes an iv pointer, and we change the iv soon after setting it. Some async crypto algorithms don't save the iv, so we need to save it in the tls_rec for async requests. Found by hardcoding x64 aesni to use async crypto manager (to test the async codepath), however I don't think this combination can happen in the wild. Presumably other hardware offloads will need this fix, but there have been no user reports. Fixes: a42055e8d2c30 ("Add support for async encryption of records...") Signed-off-by: Dave Watson <davejwatson@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/tls.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/tls.h b/include/net/tls.h
index 3cbcd12303fd..9f167e77d8ca 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -120,6 +120,8 @@ struct tls_rec {
struct scatterlist sg_aead_out[2];
char aad_space[TLS_AAD_SPACE_SIZE];
+ u8 iv_data[TLS_CIPHER_AES_GCM_128_IV_SIZE +
+ TLS_CIPHER_AES_GCM_128_SALT_SIZE];
struct aead_request aead_req;
u8 aead_req_ctx[];
};