diff options
| author | Namjae Jeon <[email protected]> | 2025-06-13 02:51:29 +0000 |
|---|---|---|
| committer | Steve French <[email protected]> | 2025-06-17 21:27:16 +0000 |
| commit | 4ea0bb8aaedfad8e695429cda6bd1c8b0dad0844 (patch) | |
| tree | e5d64aa8749f319e14f38c5dc08fb737cbfd83df /net/unix/af_unix.c | |
| parent | ksmbd: fix null pointer dereference in destroy_previous_session (diff) | |
| download | kernel-4ea0bb8aaedfad8e695429cda6bd1c8b0dad0844.tar.gz kernel-4ea0bb8aaedfad8e695429cda6bd1c8b0dad0844.zip | |
ksmbd: handle set/get info file for streamed file
The bug only appears when:
- windows 11 copies a file that has an alternate data stream
- streams_xattr is enabled on the share configuration.
Microsoft Edge adds a ZoneIdentifier data stream containing the URL
for files it downloads.
Another way to create a test file:
- open cmd.exe
- echo "hello from default data stream" > hello.txt
- echo "hello again from ads" > hello.txt:ads.txt
If you open the file using notepad, we'll see the first message.
If you run "notepad hello.txt:ads.txt" in cmd.exe, we should see
the second message.
dir /s /r should least all streams for the file.
The truncation happens because the windows 11 client sends
a SetInfo/EndOfFile message on the ADS, but it is instead applied
on the main file, because we don't check fp->stream.
When receiving set/get info file for a stream file, Change to process
requests using stream position and size.
Truncate is unnecessary for stream files, so we skip
set_file_allocation_info and set_end_of_file_info operations.
Reported-by: Marios Makassikis <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
Signed-off-by: Steve French <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
