[PATCH v1] netfs: use kfree_sensitive() instend of kfree() in fscache_free_volume()

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

 



key might contain private information, so use kfree_sensitive to free it.
In fscache_free_volume() use kfree_sensitive().

Signed-off-by: Minjie Du <duminjie@xxxxxxxx>
---
 fs/netfs/fscache_volume.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/netfs/fscache_volume.c b/fs/netfs/fscache_volume.c
index cdf991bdd9de..648a7d6eaa6a 100644
--- a/fs/netfs/fscache_volume.c
+++ b/fs/netfs/fscache_volume.c
@@ -397,7 +397,7 @@ static void fscache_free_volume(struct fscache_volume *volume)
 		fscache_unhash_volume(volume);
 
 	trace_fscache_volume(volume->debug_id, 0, fscache_volume_free);
-	kfree(volume->key);
+	kfree_sensitive(volume->key);
 	kfree(volume);
 	fscache_stat_d(&fscache_n_volumes);
 	fscache_put_cache(cache, fscache_cache_put_volume);
-- 
2.39.0





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux