lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon,  8 Jan 2024 19:27:11 +0800
From: Minjie Du <duminjie@...o.com>
To: David Howells <dhowells@...hat.com>,
	linux-cachefs@...hat.com (moderated list:FILESYSTEMS [NETFS LIBRARY]),
	linux-fsdevel@...r.kernel.org (open list:FILESYSTEMS [NETFS LIBRARY]),
	linux-kernel@...r.kernel.org (open list)
Cc: opensource.kernel@...o.com,
	Minjie Du <duminjie@...o.com>
Subject: [PATCH v1] netfs: use kfree_sensitive() instend of kfree() in fscache_free_cookie()

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

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

diff --git a/fs/netfs/fscache_cookie.c b/fs/netfs/fscache_cookie.c
index bce2492186d0..5c917d87f281 100644
--- a/fs/netfs/fscache_cookie.c
+++ b/fs/netfs/fscache_cookie.c
@@ -74,7 +74,7 @@ static void fscache_free_cookie(struct fscache_cookie *cookie)
 	if (cookie->aux_len > sizeof(cookie->inline_aux))
 		kfree(cookie->aux);
 	if (cookie->key_len > sizeof(cookie->inline_key))
-		kfree(cookie->key);
+		kfree_sensitive(cookie->key);
 	fscache_stat_d(&fscache_n_cookies);
 	kmem_cache_free(fscache_cookie_jar, cookie);
 }
-- 
2.39.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ