[RFC] SMB2 Compound related chain handling when generation of FileId has failed

Ralph Boehme slow at samba.org
Wed May 13 17:17:04 UTC 2020


Am 5/13/20 um 6:31 PM schrieb Anubhav Rakshit via samba-technical:
> Issue:
> We have a scenario where an application sends a Compound Related chain
> consisting of:
> SMB2_CREATE
> SMB2_IOCTL
> SMB2_SET_INFO
> SMB2_CLOSE
> 
> SMB2_CREATE failed with NT_STATUS_ACCESS_DENIED and subsequent
> requests all fail. In Samba they return NT_STATUS_FILE_CLOSED.
> 
> When I tried the same against a Win2k12 server, I noticed that all the
> failed requests of the chain would return NT_STATUS_ACCESS_DENIED.
> 
> I believe this behaviour is also mentioned in the [MS-SMB2] Specs
> 3.3.5.2.7.2: Handling Compounded Related Requests
> 
> “When the current operation requires a FileId and the previous
> operation either contains or generates a FileId, if the previous
> operation fails with an error, the server SHOULD<223> fail the current
> operation with the same error code returned by the previous
> operation.“
> 
> I have written a smbtorture test case to verify the above. I also
> propose the following fix. I am attaching code for your reference.
> Kindly let me know if the changes look reasonable.

oh, interesting. Yeah, I would also say that this seems to be wrong in
Samba. Let me check...

-slow

-- 
Ralph Boehme, Samba Team                https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/
GPG-Fingerprint   FAE2C6088A24252051C559E4AA1E9B7126399E46

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20200513/dcb0fc7c/signature.sig>


More information about the samba-technical mailing list