* [PATCH 5.15.y] smb: client: fix potential UAF in is_valid_oplock_break()
@ 2025-04-15 2:02 Cliff Liu
2025-04-15 21:43 ` Sasha Levin
0 siblings, 1 reply; 2+ messages in thread
From: Cliff Liu @ 2025-04-15 2:02 UTC (permalink / raw)
To: stable
Cc: sfrench, linux-cifs, samba-technical, linux-kernel, Zhe.He,
donghua.liu
From: Paulo Alcantara <pc@manguebit.com>
[ Upstream commit 69ccf040acddf33a3a85ec0f6b45ef84b0f7ec29 ]
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>
[Minor context change fixed]
Signed-off-by: Cliff Liu <donghua.liu@windriver.com>
Signed-off-by: He Zhe <Zhe.He@windriver.com>
---
Verified the build test.
---
fs/cifs/misc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 33328eae03d7..c7e2bf7a0a0d 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -464,6 +464,8 @@ is_valid_oplock_break(char *buffer, struct TCP_Server_Info *srv)
spin_lock(&cifs_tcp_ses_lock);
list_for_each(tmp, &srv->smb_ses_list) {
ses = list_entry(tmp, struct cifs_ses, smb_ses_list);
+ if (cifs_ses_exiting(ses))
+ continue;
list_for_each(tmp1, &ses->tcon_list) {
tcon = list_entry(tmp1, struct cifs_tcon, tcon_list);
if (tcon->tid != buf->Tid)
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 5.15.y] smb: client: fix potential UAF in is_valid_oplock_break()
2025-04-15 2:02 [PATCH 5.15.y] smb: client: fix potential UAF in is_valid_oplock_break() Cliff Liu
@ 2025-04-15 21:43 ` Sasha Levin
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2025-04-15 21:43 UTC (permalink / raw)
To: stable; +Cc: Cliff Liu, Sasha Levin
[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected.
No action required from the submitter.
The upstream commit SHA1 provided is correct: 69ccf040acddf33a3a85ec0f6b45ef84b0f7ec29
WARNING: Author mismatch between patch and upstream commit:
Backport author: Cliff Liu<donghua.liu@windriver.com>
Commit author: Paulo Alcantara<pc@manguebit.com>
Status in newer kernel trees:
6.14.y | Present (exact SHA1)
6.13.y | Present (exact SHA1)
6.12.y | Present (exact SHA1)
6.6.y | Present (different SHA1: 0a15ba88a32f)
6.1.y | Present (different SHA1: 494c91e1e941)
Note: The patch differs from the upstream commit:
---
1: 69ccf040acddf < -: ------------- smb: client: fix potential UAF in is_valid_oplock_break()
-: ------------- > 1: 9bdb460b7ab1a smb: client: fix potential UAF in is_valid_oplock_break()
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-5.15.y | Success | Success |
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-15 21:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-15 2:02 [PATCH 5.15.y] smb: client: fix potential UAF in is_valid_oplock_break() Cliff Liu
2025-04-15 21:43 ` Sasha Levin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.