summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorMichail Andreas Michalopoulos <mike.michalo@gmail.com>2026-11-10 02:58:13 +0700
committerNamjae Jeon <linkinjeon@kernel.org>2026-11-10 23:17:25 +0900
commit265709f9dc271693d1a261a62242db652fcc471d (patch)
tree1748f43943683f3929cf6abfeb8c7105df1cdeaa /scripts/Makefile.thinlto
parent0383a66dabd7aa06237b9b24713c03656abeffe4 (diff)
downloadlwn-265709f9dc271693d1a261a62242db652fcc471d.tar.gz
lwn-265709f9dc271693d1a261a62242db652fcc471d.zip
ksmbd: refuse reauthentication of an expired session as another user
When a Kerberos session expires, its owner can reauthenticate it. For an NTLM reauthentication, ntlm_authenticate() only compares the new user with sess->user when the session is still valid. An expired session is in SMB2_SESSION_IN_PROGRESS during the reauthentication, so it takes the other branch and simply sets sess->user to the new user: - the session's open files, tree connects and other state, created under the original user's identity, now belong to whichever user just authenticated, and a later Kerberos reauthentication is compared against that user rather than the original one; - the original struct ksmbd_user is overwritten without being freed. krb5_authenticate() already refuses a different user in this case, and the valid-session branch of ntlm_authenticate() does too. Do the same for an expired session: compare with the existing user and refuse a different one with -EKEYREJECTED, freeing the newly looked-up user either way. An AI assistant was used to find and fix this and as an independent reviewer. Fixes: a47634cd729b ("ksmbd: expire SMB sessions when Kerberos tickets expire") Cc: stable@vger.kernel.org Signed-off-by: Michail Andreas Michalopoulos <mike.michalo@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions