]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.60/crypto-authencesn-don-t-leak-pointers-to-authenc-keys.patch
Fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.14.60 / crypto-authencesn-don-t-leak-pointers-to-authenc-keys.patch
CommitLineData
a65d4bac
GKH
1From foo@baz Sat Jul 28 10:25:26 CEST 2018
2From: Tudor-Dan Ambarus <tudor.ambarus@microchip.com>
3Date: Tue, 3 Apr 2018 09:39:01 +0300
4Subject: crypto: authencesn - don't leak pointers to authenc keys
5
6From: Tudor-Dan Ambarus <tudor.ambarus@microchip.com>
7
8[ Upstream commit 31545df391d58a3bb60e29b1192644a6f2b5a8dd ]
9
10In crypto_authenc_esn_setkey we save pointers to the authenc keys
11in a local variable of type struct crypto_authenc_keys and we don't
12zeroize it after use. Fix this and don't leak pointers to the
13authenc keys.
14
15Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
16Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19---
20 crypto/authencesn.c | 1 +
21 1 file changed, 1 insertion(+)
22
23--- a/crypto/authencesn.c
24+++ b/crypto/authencesn.c
25@@ -90,6 +90,7 @@ static int crypto_authenc_esn_setkey(str
26 CRYPTO_TFM_RES_MASK);
27
28 out:
29+ memzero_explicit(&keys, sizeof(keys));
30 return err;
31
32 badkey: