summaryrefslogtreecommitdiff
path: root/fs/cifs/misc.c
diff options
context:
space:
mode:
authorEnzo Matsumiya <ematsumiya@suse.de>2022-09-20 21:10:35 +0300
committerSteve French <stfrench@microsoft.com>2022-10-08 07:06:48 +0300
commita4e430c8c8ba96be8c6ec4f2eb108bb8bcbee069 (patch)
treeff8fb70c06b5dd58f6c8d89a0b5d4d19c5a4fc5d /fs/cifs/misc.c
parentf5823f5ee36040c2a8b8b36afe0783fe0bd7ad14 (diff)
downloadlinux-a4e430c8c8ba96be8c6ec4f2eb108bb8bcbee069.tar.xz
cifs: replace kfree() with kfree_sensitive() for sensitive data
Replace kfree with kfree_sensitive, or prepend memzero_explicit() in other cases, when freeing sensitive material that could still be left in memory. Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de> Reported-by: kernel test robot <oliver.sang@intel.com> Link: https://lore.kernel.org/r/202209201529.ec633796-oliver.sang@intel.com Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r--fs/cifs/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 20a112c96bae..72bd1b2b323f 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -1119,7 +1119,7 @@ cifs_alloc_hash(const char *name,
void
cifs_free_hash(struct crypto_shash **shash, struct sdesc **sdesc)
{
- kfree(*sdesc);
+ kfree_sensitive(*sdesc);
*sdesc = NULL;
if (*shash)
crypto_free_shash(*shash);