smb: client: fix potential UAF in cifs_debug_files_proc_show()
authorPaulo Alcantara <pc@manguebit.com>
Tue, 2 Apr 2024 19:33:53 +0000 (16:33 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:36:04 +0000 (16:36 +0200)
commita65f2b56334ba4dc30bd5ee9ce5b2691b973344d
tree0d0c7579f1dedab895aa9e0fdfd764be6bab83ae
parent6f17163b9339fac92023a1d9bef22128db3b9a4b
smb: client: fix potential UAF in cifs_debug_files_proc_show()

commit ca545b7f0823f19db0f1148d59bc5e1a56634502 upstream.

Skip sessions that are being teared down (status == SES_EXITING) to
avoid UAF.

Cc: stable@vger.kernel.org
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/client/cifs_debug.c
fs/smb/client/cifsglob.h