]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
smb: client: fix potential UAF in cifs_stats_proc_show()
authorPaulo Alcantara <pc@manguebit.com>
Tue, 2 Apr 2024 19:33:56 +0000 (16:33 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:44:21 +0000 (07:44 +0200)
commitbb6570085826291dc392005f9fec16ea5da3c8ad
treecf204d0e5ef541d88aba63b49d8c59f5cd0b2693
parentce49569079a9d4cad26c0f1d4653382fd9a5ca7a
smb: client: fix potential UAF in cifs_stats_proc_show()

commit 0865ffefea197b437ba78b5dd8d8e256253efd65 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>
[ cifs_debug.c was moved from fs/cifs to fs/smb/client since
  38c8a9a52082 ("smb: move client and server files to common directory fs/smb").
  The cifs_ses_exiting() was introduced to cifs_debug.c since
  ca545b7f0823 ("smb: client: fix potential UAF in cifs_debug_files_proc_show()")
  which has been sent to upstream already. ]
Signed-off-by: Jianqi Ren <jianqi.ren.cn@windriver.com>
Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/cifs_debug.c