[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250811094639.37446-4-chanho.min@lge.com>
Date: Mon, 11 Aug 2025 18:46:38 +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,
Chanho Min <chanho.min@....com>,
Steve French <stfrench@...rosoft.com>
Subject: [PATCH 3/4] smb: client: fix potential UAF in smb2_is_valid_lease_break()
From: Paulo Alcantara <pc@...guebit.com>
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>
[ chanho: Backported to v5.4.y, smb2misc.c was moved from fs/cifs to fs/smb/client ]
Signed-off-by: Chanho Min <chanho.min@....com>
Signed-off-by: Steve French <stfrench@...rosoft.com>
---
fs/cifs/smb2misc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c
index d7cbf1b07126c..c47927d257635 100644
--- a/fs/cifs/smb2misc.c
+++ b/fs/cifs/smb2misc.c
@@ -611,7 +611,8 @@ smb2_is_valid_lease_break(char *buffer)
list_for_each(tmp1, &server->smb_ses_list) {
ses = list_entry(tmp1, struct cifs_ses, smb_ses_list);
-
+ if (cifs_ses_exiting(ses))
+ continue;
list_for_each(tmp2, &ses->tcon_list) {
tcon = list_entry(tmp2, struct cifs_tcon,
tcon_list);
Powered by blists - more mailing lists