SMB2/3 Credits (Multi-Credit) support

Christian Ambach ambi at samba.org
Tue Jul 10 07:20:02 MDT 2012


On 06/28/2012 08:04 AM, Michael Adam wrote:

> I reviewed the code a lot and admittedly also discussed the logic
> with Metze to some extent since I did not now enough about the
> crediting system before. The new code is imho very clean and understandable
> and seems to be correct.
>
Sorry for the late review, but here are my comments:

 > commit 82dc0b33b9af5094d78f3ecd855900e49c580343
 > Author: Stefan Metzmacher<metze at samba.org>
 > Date:   Wed Jun 27 15:33:43 2012 +0200
 >
 >  s3:smb2_server: make sure sequence numbers don't wrap at UINT64_MAX
 >
 >      metze

[MS-SMB2] says that the connection needs to be disconnected once 
UINT64_MAX is reached, so we should add that as well I think.

 > commit 967f2c44b3b911d151ea262b748d68654ba9e2fc
 > Author: Stefan Metzmacher<metze at samba.org>
 > Date:   Mon Jun 25 21:14:43 2012 +0200
 >
 >      s3:smb2_server: simplify smbd_smb2_request_verify_creditcharge() 
a bit.
 >
 >      A credit charge of 0 is really not a special case, it just means 
the same
 >      as 1.
 >
 >      metze

I added this check because of the following statement in [MS-SMB2]:

3.3.5.2.5 Verifying the Credit Charge and the Payload Size
If Connection.SupportsMultiCredit is TRUE, the server MUST verify the
CreditCharge field in the SMB2 header and the payload size of the request.
If CreditCharge is zero and the payload size of the request is greater
than 64 kilobytes, the server MUST fail the request with the error code
STATUS_INVALID_PARAMETER.

Did your tests reveal that the documentation is wrong or why did you
remove the check?

Cheers,
Christian


More information about the samba-technical mailing list