summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorDaeMyung Kang <charsyam@gmail.com>2026-10-09 00:25:37 +0900
committerNamjae Jeon <linkinjeon@kernel.org>2026-10-14 07:20:23 +0900
commite0b1fcbad7f85ec0f0aef57512d0363718307136 (patch)
treed47e68778e4e13583dac1c43506bde309502a7e5 /tools/lib/python
parent4cfb07ac1392b9c557b7c9040ba52a0f994f03dc (diff)
downloadlinux-next-e0b1fcbad7f85ec0f0aef57512d0363718307136.tar.gz
linux-next-e0b1fcbad7f85ec0f0aef57512d0363718307136.zip
ksmbd: preserve unreadable named streams on open
A write-only client can open an existing named stream with FILE_OPEN_IF without permission to read the underlying file. The case-insensitive lookup finds the xattr name, but querying its value length then fails with -EACCES. smb2_set_stream_name_xattr() treats every negative result as a missing stream and replaces the existing xattr with an empty value. A failed xattr list is not proof that the stream is absent either: for example, -ENOMEM can lead to the same empty replacement. Preserve listing errors and create a stream only for -ENOENT or -ENODATA. The latter can occur if the xattr is removed between listing its name and querying its value. Return other lookup errors without changing the stream. A write-only FILE_OPEN now reports access denied instead of name not found. FILE_OVERWRITE_IF and FILE_SUPERSEDE on an unreadable stream also fail instead of appearing to replace it. Stream writes and EOF changes already need to read the old value, so such handles cannot update the stream after opening either. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") 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