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.
Created attachment 18171 [details] Windows 10 returns STATUS_BUFFER_OVERFLOW
Created attachment 18172 [details] Samba returns NT_STATUS_INFO_LENGTH_MISMATCH
Created attachment 18173 [details] packet capture of windows 10
Created attachment 18174 [details] packet capture of samba
I wrote a torture to reproduce this issue. https://gitlab.com/samba-team/devel/samba/-/commit/a8fbaaf590f90791aba952d708488c05155b38e5 patch: https://gitlab.com/samba-team/devel/samba/-/commit/5d82ae6d59ef10b71082f32e9fd3951e9bde34cb
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