lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250811094639.37446-5-chanho.min@lge.com>
Date: Mon, 11 Aug 2025 18:46:39 +0900
From: Chanho Min <chanho.min@....com>
To: Steve French <sfrench@...ba.org>,
	linux-cifs@...r.kernel.org
Cc: samba-technical@...ts.samba.org,
	linux-kernel@...r.kernel.org,
	gunho.lee@....com,
	gregkh@...uxfoundation.org,
	sashal@...nel.org,
	Paulo Alcantara <pc@...guebit.com>,
	stable@...r.kernel.org,
	Steve French <stfrench@...rosoft.com>,
	Chanho Min <chanho.min@....com>
Subject: [PATCH 4/4] smb: client: fix potential UAF in cifs_stats_proc_write()

From: Paulo Alcantara <pc@...guebit.com>

commit d3da25c5ac84430f89875ca7485a3828150a7e0a upstream.

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

Cc: stable@...r.kernel.org # 5.4
Signed-off-by: Paulo Alcantara (Red Hat) <pc@...guebit.com>
Signed-off-by: Steve French <stfrench@...rosoft.com>
[ chanho: Backported to v5.4.y, cifs_debug.c was moved from fs/cifs to fs/smb/client ]
Signed-off-by: Chanho Min <chanho.min@....com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
 fs/cifs/cifs_debug.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index df3dfa611c352..47190e676aa25 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -470,6 +470,8 @@ static ssize_t cifs_stats_proc_write(struct file *file,
 			}
 #endif /* CONFIG_CIFS_STATS2 */
 			list_for_each(tmp2, &server->smb_ses_list) {
+				if (cifs_ses_exiting(ses))
+					continue;
 				ses = list_entry(tmp2, struct cifs_ses,
 						 smb_ses_list);
 				list_for_each(tmp3, &ses->tcon_list) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ