]>
Commit | Line | Data |
---|---|---|
a65d4bac GKH |
1 | From foo@baz Sat Jul 28 10:25:26 CEST 2018 |
2 | From: Tudor-Dan Ambarus <tudor.ambarus@microchip.com> | |
3 | Date: Tue, 3 Apr 2018 09:39:01 +0300 | |
4 | Subject: crypto: authencesn - don't leak pointers to authenc keys | |
5 | ||
6 | From: Tudor-Dan Ambarus <tudor.ambarus@microchip.com> | |
7 | ||
8 | [ Upstream commit 31545df391d58a3bb60e29b1192644a6f2b5a8dd ] | |
9 | ||
10 | In crypto_authenc_esn_setkey we save pointers to the authenc keys | |
11 | in a local variable of type struct crypto_authenc_keys and we don't | |
12 | zeroize it after use. Fix this and don't leak pointers to the | |
13 | authenc keys. | |
14 | ||
15 | Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> | |
16 | Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> | |
17 | Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> | |
18 | Signed-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: |