Bug 16032 - QUERY_INFO FILE_STREAM_INFO returns no data when there is a BUFFER_OVERFLOW and sets the output_buffer_offset to 0
Summary: QUERY_INFO FILE_STREAM_INFO returns no data when there is a BUFFER_OVERFLOW a...
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-03-15 01:10 UTC by Richard Sharpe
Modified: 2026-04-10 19:49 UTC (History)
1 user (show)

See Also:


Attachments
Capture of the Samba response. (3.90 KB, application/vnd.tcpdump.pcap)
2026-03-15 01:10 UTC, Richard Sharpe
no flags Details
Capture of the Windows behavior. (293.32 KB, application/vnd.tcpdump.pcap)
2026-03-15 01:11 UTC, Richard Sharpe
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Sharpe 2026-03-15 01:10:50 UTC
Created attachment 18901 [details]
Capture of the Samba response.

While we were testing with files with a large number of streams (5,000 on Windows Server 2019 and 10,000 with Samba) we found a difference between Samba's behavior and the behavior of Windows.

Both Samba and Windows return STATUS_BUFFER_OVERFLOW but Windows returns as many stream structs as will fit in the buffer supplied, while Samba returns zero entries.

Further, Samba sets the OutPutBufferOffset field to 0.

The spec is ambiguous in regard to the value of the OutputBufferOffset, however, it seems Samba should do what Windows does.

https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/3b1b3598-a898-44ca-bfac-2dcae065247f

Attached are two captures, one against Windows Server 2019 and one against Samba (derived from 4.7.1).
Comment 1 Richard Sharpe 2026-03-15 01:11:23 UTC
Created attachment 18902 [details]
Capture of the Windows behavior.
Comment 3 Jeremy Allison 2026-04-10 19:49:11 UTC
Sorry. Added (incorrect) comment to the wrong bug. Please ignore.