Description: |
|
---|
SMB2: WPTS CreateClose test case fixes
Review Request #2408 — Created Oct. 23, 2019 and submitted
Information | |
---|---|
andy_js | |
illumos-gate | |
11863, 11864, 11865 | |
Reviewers | |
general | |
gdamore, gwr |
11863 SMB2 CREATE should validate impersonation level
While we don't use the impersonation level we should be ensuring that the client hasn't passed a bogus value for it:
"If the ImpersonationLevel in the request is not one of the values specified in section 2.2.13, the server SHOULD fail the request with STATUS_BAD_IMPERSONATION_LEVEL."
This impacts the following WPTS test cases:
CreateCloseTestCaseS640
CreateCloseTestCaseS733
CreateCloseTestCaseS17911864 SMB2 CREATE should reject absolute paths
The SMB2 documentation says we should reject CREATE requests with absolute paths but we don't currently do that:
"If the file name length is greater than zero and the first character is a path separator character, the server MUST fail the request with STATUS_INVALID_PARAMETER."
This impacts the following WPTS test cases:
CreateCloseTestCaseS249
CreateCloseTestCaseS122
CreateCloseTestCaseS443
CreateCloseTestCaseS418
CreateCloseTestCaseS406
CreateCloseTestCaseS379
CreateCloseTestCaseS367
CreateCloseTestCaseS346
CreateCloseTestCaseS331
CreateCloseTestCaseS285
CreateCloseTestCaseS27311865 SMB2 CREATE should check MxAc create context size
The SMB2 server should fail with STATUS_INVALID_PARAMETER if the size of a MxAc create context is not large enough to hold the optional timestamp value. This is something the WPTS checks for by issuing a bogus CREATE request with a MxAc create context with a size of 4 bytes (the spec says it MUST be either 0 or 8 bytes long):
"The Data in the Buffer field of the SMB2_CREATE_CONTEXT MUST either contain the following structure or be empty (0 bytes in length)."
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/5ea40835-5d40-4e85-977d-13cd745d3af8This impacts the following WPTS test case:
InvalidCreateRequestStructureSize
Prior to applying the fix the above test cases fail. With the fix applied they now pass.
Description: |
|
---|
Change Summary:
Merge changes from 11864 and 11865.
Summary: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bugs: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 2 (+30 -3) |
Change Summary:
Simplify changes and update 11865 to match what the code is now doing.
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+36 -3) |
-
-
usr/src/uts/common/fs/smbsrv/smb2_create.c (Diff revision 3) Looks good, though I might wish for a comment here like:
Optional input data for this CC. See below.