net: ipv4: Use kfree_sensitive instead of kfree
Subsystems (3)
PATCH 1/1 net: ipv4: Use kfree_sensitive instead of kfree
key might contain private part of the key, so better use kfree_sensitive to free it.
--- net/ipv4/esp4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/esp4.c +1 -1
@@ -1132,7 +1132,7 @@ static int esp_init_authenc(struct xfrm_state *x, err =crypto_aead_setkey (aead, key, keylen); free_key: -kfree (key); +kfree_sensitive (key); error:return err;
Signature · 1 line
2.25.1
Quoted 14 lines · Wang Ming
key might contain private part of the key, so better use
kfree_sensitiveto free it.Fixes 38320c70d282 ("[IPSEC]: Use crypto_aead and authenc in ESP")Signed-off-by Wang Ming <[email protected]>--- net/ipv4/esp4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/ipv4/esp4.c +0
-0
net/ipv4/esp4.c static int esp_init_authenc(struct xfrm_state *x, · line 1138
Quoted 8 lines
net/ipv4/esp4.c +1
-1@@ -1132,7 +1132,7 @@ static int esp_init_authenc(struct xfrm_state *x, err =crypto_aead_setkey (aead, key, keylen); free_key: -kfree (key); +kfree_sensitive (key); error:return err;
LGTM.
From: Wang Ming <[email protected]>
Date: Mon, 17 Jul 2023 17:59:19 +0800
Quoted 5 lines
key might contain private part of the key, so better use
kfree_sensitiveto free it.Fixes 38320c70d282 ("[IPSEC]: Use crypto_aead and authenc in ESP")Signed-off-by Wang Ming <[email protected]>
Quoted 19 lines
--- net/ipv4/esp4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/ipv4/esp4.c +1
-1@@ -1132,7 +1132,7 @@ static int esp_init_authenc(struct xfrm_state *x, err =crypto_aead_setkey (aead, key, keylen); free_key: -kfree (key); +kfree_sensitive (key); error:return err;Signature · 1 line
2.25.1
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:
Quoted 8 lines · On Mon, 17 Jul 2023 17:59:19 +0800 you wrote:
key might contain private part of the key, so better use
kfree_sensitiveto free it.Fixes 38320c70d282 ("[IPSEC]: Use crypto_aead and authenc in ESP")Signed-off-by Wang Ming <[email protected]>--- net/ipv4/esp4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [net,v1] net: ipv4: Use kfree_sensitive instead of kfree
https://git.kernel.org/netdev/net/c/daa751444fd9
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html