diff options
| author | Mohammed Alquraini <mohammed.saad.alquraini@gmail.com> | 2026-10-20 20:30:00 +0300 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-10-21 09:18:41 +0900 |
| commit | da25995071e5e0f3aa9a41160b00b2f833127b3e (patch) | |
| tree | 7a3660d54ff8ce3e27ea4c4cdb0c75d55a36cf9f /scripts/Makefile.thinlto | |
| parent | df5c868f6b80ca16c171cfac5e4e6c9be83ba4c2 (diff) | |
| download | linux-da25995071e5e0f3aa9a41160b00b2f833127b3e.tar.gz linux-da25995071e5e0f3aa9a41160b00b2f833127b3e.zip | |
ksmbd: reject foreign RPC pipe handles on IPC$ read and write
RPC pipe handles on IPC$ are allocated from a single server-global IDA,
and ksmbd.mountd looks a pipe up by handle alone, with no session
information. smb2_read_pipe() and smb2_write_pipe() take the handle
straight from the client request (VolatileFileId) and pass it to the
daemon without checking that the requesting session opened it. An
authenticated user can therefore issue an SMB2 READ or WRITE on IPC$
with another session's handle and receive that session's in-flight
DCERPC response, or write attacker-chosen bytes into its pipe stream.
A tree connect to IPC$, which every RPC client already has, is the only
requirement.
Validate ownership before the transfer, the way the sibling pipe paths
already do: under sess->rpc_lock, ksmbd_session_rpc_method() returns 0
for a handle the session did not open. smb2_get_info_file_pipe() and
the FSCTL_PIPE_TRANSCEIVE ioctl already reject such handles; read and
write were the remaining gap. Reject them with STATUS_FILE_CLOSED, as
the ioctl path does.
Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Assisted-by: LLM
Signed-off-by: Mohammed Alquraini <mohammed.saad.alquraini@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
