* [PATCH 6.1] ksmbd: fix use-after-free in session logoff
@ 2025-11-27 15:05 Nazar Kalashnikov
2025-11-27 15:18 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Nazar Kalashnikov @ 2025-11-27 15:05 UTC (permalink / raw)
To: stable, Greg Kroah-Hartman
Cc: Nazar Kalashnikov, Namjae Jeon, Steve French, Sergey Senozhatsky,
Tom Talpey, linux-cifs, linux-kernel, lvc-project, Sean Heelan,
Steve French
From: Nazar Kalashnikov <sivartiwe@gmail.com>
From: Sean Heelan <seanheelan@gmail.com>
commit 2fc9feff45d92a92cd5f96487655d5be23fb7e2b upstream.
The sess->user object can currently be in use by another thread, for
example if another connection has sent a session setup request to
bind to the session being free'd. The handler for that connection could
be in the smb2_sess_setup function which makes use of sess->user.
Signed-off-by: Sean Heelan <seanheelan@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Nazar Kalashnikov <sivartiwe@gmail.com>
---
Backport fix for CVE-2025-37899
fs/smb/server/smb2pdu.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index d2dca5d2f17c..f72ef3fe4968 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -2252,10 +2252,6 @@ int smb2_session_logoff(struct ksmbd_work *work)
sess->state = SMB2_SESSION_EXPIRED;
up_write(&conn->session_lock);
- if (sess->user) {
- ksmbd_free_user(sess->user);
- sess->user = NULL;
- }
ksmbd_all_conn_set_status(sess_id, KSMBD_SESS_NEED_NEGOTIATE);
rsp->StructureSize = cpu_to_le16(4);
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 6.1] ksmbd: fix use-after-free in session logoff
2025-11-27 15:05 [PATCH 6.1] ksmbd: fix use-after-free in session logoff Nazar Kalashnikov
@ 2025-11-27 15:18 ` Greg Kroah-Hartman
[not found] ` <CAKnNz1OYAG-cwPEU6AuKr1mmGWiEzP1-ss9v8K38xspiHFdm+g@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2025-11-27 15:18 UTC (permalink / raw)
To: Nazar Kalashnikov
Cc: stable, Namjae Jeon, Steve French, Sergey Senozhatsky, Tom Talpey,
linux-cifs, linux-kernel, lvc-project, Sean Heelan, Steve French
On Thu, Nov 27, 2025 at 06:05:10PM +0300, Nazar Kalashnikov wrote:
> From: Nazar Kalashnikov <sivartiwe@gmail.com>
>
> From: Sean Heelan <seanheelan@gmail.com>
That's odd, which is correct?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 6.1] ksmbd: fix use-after-free in session logoff
[not found] ` <CAKnNz1OYAG-cwPEU6AuKr1mmGWiEzP1-ss9v8K38xspiHFdm+g@mail.gmail.com>
@ 2025-11-27 16:11 ` SIVARTIWE PROST
0 siblings, 0 replies; 3+ messages in thread
From: SIVARTIWE PROST @ 2025-11-27 16:11 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, Namjae Jeon, Steve French, Sergey Senozhatsky, Tom Talpey,
linux-cifs, linux-kernel, lvc-project, Sean Heelan, Steve French
Sorry about that! I will send the revised second version shortly
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-11-27 16:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-27 15:05 [PATCH 6.1] ksmbd: fix use-after-free in session logoff Nazar Kalashnikov
2025-11-27 15:18 ` Greg Kroah-Hartman
[not found] ` <CAKnNz1OYAG-cwPEU6AuKr1mmGWiEzP1-ss9v8K38xspiHFdm+g@mail.gmail.com>
2025-11-27 16:11 ` SIVARTIWE PROST
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox