]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: fix double-fault crash during ntlmssp
authorPaulo Alcantara <pc@cjr.nz>
Fri, 14 Oct 2022 20:14:54 +0000 (17:14 -0300)
committerSteve French <stfrench@microsoft.com>
Sat, 15 Oct 2022 15:04:38 +0000 (10:04 -0500)
commit175299b5bd364006a609e232b93a3dfb76e59d78
tree478979757303c662c91b32695d38c8d5be5686cc
parent11d52e66a2b3736e0e7206f7f840c7b40e84994b
cifs: fix double-fault crash during ntlmssp

The crash occurred because we were calling memzero_explicit() on an
already freed sess_data::iov[1] (ntlmsspblob) in sess_free_buffer().

Fix this by not calling memzero_explicit() on sess_data::iov[1] as
it's already by handled by callers.

Fixes: 51865fc04b82 ("cifs: replace kfree() with kfree_sensitive() for sensitive data")
Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/sess.c