Why this padding check? (SMB2 client query info response handling)

Gordon Ross gordon.w.ross at gmail.com
Wed Oct 1 13:38:23 MDT 2014


Can anyone explain why this padding check is here?

libcli/smb/smb2cli_query_info.c : 157

if (output_buffer_length < dyn_len) {
    tevent_req_nterror(
        req, NT_STATUS_INVALID_NETWORK_RESPONSE);
    return;
}

That's demanding the that query response data is padded out to
fill the (padded out) length of the SMB2 response.
As far as I can tell, the spec. does not require that,
and the Samba client appears to be the only one
we've run across that insists on this padding.

To clarify, we pad the (outer) SMB2 response to 8 bytes as
required by MS-SMB2, but we don't currently pad out the
query info response data contained therein.
Did I miss something in one of the specs?

Thanks,

-- 
Gordon Ross <gwr at nexenta.com>
Nexenta Systems, Inc.  www.nexenta.com
Enterprise class storage for everyone


More information about the samba-technical mailing list