Bug 15500 - Samba does not response STATUS_BUFFER_OVERFLOW when receiving Find request with insufficient OutputBufferLength
Summary: Samba does not response STATUS_BUFFER_OVERFLOW when receiving Find request w...
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.15.13
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-24 08:04 UTC by Mike Liu
Modified: 2024-03-04 02:38 UTC (History)
0 users

See Also:


Attachments
Windows 10 returns STATUS_BUFFER_OVERFLOW (16.89 KB, image/png)
2023-10-24 08:05 UTC, Mike Liu
no flags Details
Samba returns NT_STATUS_INFO_LENGTH_MISMATCH (15.90 KB, image/png)
2023-10-24 08:06 UTC, Mike Liu
no flags Details
packet capture of windows 10 (10.57 KB, application/octet-stream)
2023-10-24 08:57 UTC, Mike Liu
no flags Details
packet capture of samba (12.01 KB, application/vnd.tcpdump.pcap)
2023-10-24 08:58 UTC, Mike Liu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Liu 2023-10-24 08:04:48 UTC
Hi Samba,
I noticed that when samba server receives Find request with insufficient OutputBufferLength,
it will fail the request with NT_STATUS_INFO_LENGTH_MISMATCH.
But Windows 10 returns STATUS_BUFFER_OVERFLOW.
Comment 1 Mike Liu 2023-10-24 08:05:27 UTC
Created attachment 18171 [details]
Windows 10 returns STATUS_BUFFER_OVERFLOW
Comment 2 Mike Liu 2023-10-24 08:06:20 UTC
Created attachment 18172 [details]
Samba returns NT_STATUS_INFO_LENGTH_MISMATCH
Comment 3 Mike Liu 2023-10-24 08:57:49 UTC
Created attachment 18173 [details]
packet capture of windows 10
Comment 4 Mike Liu 2023-10-24 08:58:21 UTC
Created attachment 18174 [details]
packet capture of samba
Comment 6 Mike Liu 2024-03-04 02:38:01 UTC
Hello Mike, as per the algorithm in MS-FSA, returning STATUS_BUFFER OVERFLOW is correct. Your traces show that there is sufficient space for one entry and not the second. If the provided buffer is such that even a single entry couldn't fit in, then STATUS_INFO_LENGTH_MISMATCH is expected. 

Regards,
Sreekanth Nadendla
Microsoft Windows Open Specifications

-----

From: Mike Liu 劉哲宇 <mikeliu@qnap.com>
Sent: Wednesday, January 10, 2024 10:21 PM
To: Interoperability Documentation Help <dochelp@microsoft.com>
Subject: [EXTERNAL] [Ask] Find response with STATUS_BUFFER_OVERFLOW for insufficient OutputBufferLength 

Hi  dochelp@microsoft.com,

I noticed that when Windows 10 receives Find request with insufficient OutputBufferLength,
it will fail the request with STATUS_BUFFER_OVERFLOW.
But Samba server returns NT_STATUS_INFO_LENGTH_MISMATCH. 
So I filed a bug on samba bugzilla.
https://bugzilla.samba.org/show_bug.cgi?id=15500

Attached is sniffer packet (Windows 10 and Samba).
Which status is right for this situation?
Thanks.
 
Best Regards,
Mike Liu