summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorDaeMyung Kang <charsyam@gmail.com>2026-10-09 00:25:35 +0900
committerNamjae Jeon <linkinjeon@kernel.org>2026-10-14 07:20:19 +0900
commit75ec58968fe742c8656b921eaedb5bc34d6ca0f3 (patch)
tree6c575f44675468bdd997320e52bb0c7c5ca0f5ff /tools/lib/python
parent1343e0f761605c36b7873cf6520fcbaebcd13c3f (diff)
downloadlinux-next-75ec58968fe742c8656b921eaedb5bc34d6ca0f3.tar.gz
linux-next-75ec58968fe742c8656b921eaedb5bc34d6ca0f3.zip
ksmbd: return end of file for reads past a named stream's data
A READ on a non-empty named stream at or beyond its end fails with STATUS_INVALID_PARAMETER. ksmbd_vfs_stream_read() returns -EINVAL when the offset is not below the stream length, and smb2_read() maps -EINVAL to that status. smb2_read() already turns a zero-byte read into STATUS_END_OF_FILE, the status a regular file returns at its end, and an empty stream already takes that path. Return 0 instead of -EINVAL so that non-empty streams do the same. Clients that read a stream until end of file otherwise get an error once they have read all of its data. The buffered copychunk path converts a zero-byte source read to -EIO, as it does for a regular file that shrinks during copying. Fixes: 2ae1a6cc4302 ("cifsd: fix potential read overflow in ksmbd_vfs_stream_read()") Cc: stable@vger.kernel.org Signed-off-by: DaeMyung Kang <charsyam@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions