diff options
author | Enzo Matsumiya <ematsumiya@suse.de> | 2022-09-20 21:10:35 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-10-08 07:06:48 +0300 |
commit | a4e430c8c8ba96be8c6ec4f2eb108bb8bcbee069 (patch) | |
tree | ff8fb70c06b5dd58f6c8d89a0b5d4d19c5a4fc5d /fs/cifs/smb2ops.c | |
parent | f5823f5ee36040c2a8b8b36afe0783fe0bd7ad14 (diff) | |
download | linux-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/smb2ops.c')
-rw-r--r-- | fs/cifs/smb2ops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 10f9ef68e510..9a686870e8b7 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -4423,11 +4423,11 @@ crypt_message(struct TCP_Server_Info *server, int num_rqst, if (!rc && enc) memcpy(&tr_hdr->Signature, sign, SMB2_SIGNATURE_SIZE); - kfree(iv); + kfree_sensitive(iv); free_sg: - kfree(sg); + kfree_sensitive(sg); free_req: - kfree(req); + kfree_sensitive(req); return rc; } |