Patch "net: ipv4: Use kfree_sensitive instead of kfree" has been added to the 6.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: ipv4: Use kfree_sensitive instead of kfree

to the 6.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-ipv4-use-kfree_sensitive-instead-of-kfree.patch
and it can be found in the queue-6.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8f4e7983251e6782f216def6e2b47a48976a5841
Author: Wang Ming <machel@xxxxxxxx>
Date:   Mon Jul 17 17:59:19 2023 +0800

    net: ipv4: Use kfree_sensitive instead of kfree
    
    [ Upstream commit daa751444fd9d4184270b1479d8af49aaf1a1ee6 ]
    
    key might contain private part of the key, so better use
    kfree_sensitive to free it.
    
    Fixes: 38320c70d282 ("[IPSEC]: Use crypto_aead and authenc in ESP")
    Signed-off-by: Wang Ming <machel@xxxxxxxx>
    Reviewed-by: Tariq Toukan <tariqt@xxxxxxxxxx>
    Reviewed-by: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index ba06ed42e4284..2be2d49225573 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -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;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux