diff options
| author | Ian Bridges <icb@fastmail.org> | 2026-10-28 20:25:32 -0500 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-11-01 10:56:11 +0900 |
| commit | 09139429fab3a5114c18d7c15fb161511d4d66c9 (patch) | |
| tree | 4bb48eb376ba515ddffabed7ea7506f2df10384c /scripts/Makefile.thinlto | |
| parent | 1dd91081ba3c692565f9c1f884149178d5a06d1e (diff) | |
| download | linux-next-09139429fab3a5114c18d7c15fb161511d4d66c9.tar.gz linux-next-09139429fab3a5114c18d7c15fb161511d4d66c9.zip | |
ksmbd: enforce the read-only share flag when creating a stream
When a share is read-only, smb2_open() rejects opens that would create
or truncate a file. Creating a named stream on an existing file with
streams_xattr sets neither O_CREAT nor O_TRUNC, so it passes this check,
and smb2_set_stream_name_xattr() then creates the stream. On a Time
Machine share, opening a missing AFP_AfpInfo stream also writes one. A
user who can write a file at the filesystem level can therefore add
streams to it through a read-only share.
Do not create a stream or synthesize AFP_AfpInfo when the share is not
writable. Existing streams still open normally, and a missing stream
opened with FILE_OPEN still returns STATUS_OBJECT_NAME_NOT_FOUND.
Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Fixes: eaff8e924f60 ("ksmbd: synthesize empty AFP_AfpInfo xattr on first probe")
Cc: stable@vger.kernel.org
Signed-off-by: Ian Bridges <icb@fastmail.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
