[PATCHSET] honour output buffer length for SMB2 GetInfo

Ralph Wuerthner ralphw at de.ibm.com
Mon Aug 5 02:24:58 MDT 2013


On 03/08/13 19:22, Volker Lendecke wrote:
> On Fri, Aug 02, 2013 at 05:09:15PM -0700, Jeremy Allison wrote:
>> On Mon, Jul 29, 2013 at 10:01:06AM +0200, Ralph Wuerthner wrote:
>>> Hi,
>>>
>>> please see attached patchset to honour output buffer length set by
>>> the client for SMB2 GetInfo requests. The patchset also enhances
>>> GetInfo for file system information classes SMB_QUERY_FS_VOLUME_INFO
>>> and SMB_QUERY_FS_ATTRIBUTE_INFO to return partial, but valid data in
>>> case output buffer length is too small. This behaviour is documented
>>> in MS-FSCC.
>>>
>>> We had a customer defect where a client submitted a GetInfo
>>> SMB_QUERY_FS_VOLUME_INFO request with a output buffer length of 24
>>> bytes. Samba responded with a full length response of 40 bytes which
>>> resulted in a client error.
>>
>> Sorry for the delay. I'm happy with this patchset and will
>> add my:
>>
>> Reviewed-by: Jeremy Allison <jra at samba.org>
>>
>> tag. Can I get a second Team member +1 on this and I'll
>> push to master and get a bug logged to get this into the
>> next release ?
>
> +1 from me.
>
> One question: It seems we don't have a torture test for
> this. Can we get one?

For testing my patchset I wrote a simple smbtorture test. Initially I 
thought about adding this to smb2.getinfo, but smb2.getinfo is on the 
known fail list because of missing streams support in Samba in standard 
configuration and an issue with file timestamps.

Can we add this to smb2.getinfo regardless of the issues mentioned above 
or what would be the preferred solution?

Regards

	Ralph



More information about the samba-technical mailing list