summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc
diff options
context:
space:
mode:
authorIan Bridges <icb@fastmail.org>2026-11-11 21:18:50 -0600
committerNamjae Jeon <linkinjeon@kernel.org>2026-11-15 10:08:13 +0900
commit91d16c8a2d6b161eac4907eb5a9442510e4f2ce2 (patch)
tree6e53168072b66c12a8765243ced2e302a6fa1bdf /tools/lib/python/kdoc
parente803eb371559d64f337d3078d5e7749716b39160 (diff)
ksmbd: fix out-of-bounds read in expired-session LOCK check
smb2_session_expired_cmd_allowed() runs from smb2_check_user_session() before ksmbd_smb2_check_message() has validated the request. For a LOCK on an expired Kerberos session it scans the lock elements, using the unvalidated NextCommand field as the command length. A malformed request makes it read past the request buffer. BUG: KASAN: slab-out-of-bounds in smb2_session_expired_cmd_allowed+0x260/0x2a0 [ksmbd] Call Trace: smb2_session_expired_cmd_allowed+0x260/0x2a0 [ksmbd] smb2_check_user_session+0x4ff/0x680 [ksmbd] handle_ksmbd_work+0x465/0x1cb0 [ksmbd] Decide whether a command may run on an expired session from the command alone. Move the unlock-only rule for LOCK into smb2_lock(), which runs after the request has been validated. An expired session can still release byte-range locks but cannot take new ones, as before. A LOCK on an expired session now goes through the normal request checks before smb2_lock() sees it, as CLOSE and LOGOFF already do. A malformed one is rejected by those checks instead of returning STATUS_NETWORK_SESSION_EXPIRED. Fixes: a47634cd729b ("ksmbd: expire SMB sessions when Kerberos tickets expire") Cc: stable@vger.kernel.org Signed-off-by: Ian Bridges <icb@fastmail.org> Tested-by: Michail Andreas Michalopoulos <mike.michalo@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions