[cifs-protocol] MS-SMB2: Create replay and Persistent Handle
Ralph Boehme
slow at samba.org
Mon Jun 16 15:25:07 UTC 2025
Hi dochelp,
I'm currently trying to understand the following behaviour related to
create-replay observed against a Windows Server:
1. establish SMB3 connection
2. open a Persistent Handle
3. disconnect
4. reconnect
5. replay the create
6. write
7. replay the create again
The last step fails with STATUS_FILE_NOT_AVAILABLE which I can't align
with the docs.
3.3.5.13 Receiving an SMB2 WRITE Request has
---8<---
If Open.IsPersistent is FALSE and Open.IsReplayEligible is TRUE, the
server MUST set Open.IsReplayEligible to FALSE.
---8<---
so, as Open.IsPersistent is TRUE, Open.IsReplayEligible should be kept
as TRUE.
Then CREATE processing 3.3.5.9 Receiving an SMB2 CREATE Request should
apply:
---8<---
If the server implements the SMB 3.x dialect family and all of the
following conditions are TRUE, the server MUST look up an Open in
GlobalOpenTable where Open.IsReplayEligible is TRUE and
Open.CreateGuid matches the CreateGuid in the
SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2
...
If an Open is found, the server MUST perform the following:
...
- Construct the create response from Open, as specified in the
"Response Construction" phase; the remaining create processing
MUST be skipped.
---8<---
See attached network trace "ph-replay.pcap".
If I do the same but change the second replay from step 7 to a "normal"
CREATE, that returns successful and just opens a second handle on the
file (trace "ph-replay-once.pcap").
If I do the same with just a Durable Handles in step 2 instead of a PH
and a replay in step 7, the replay in step 7 is "ignored" and treated as
a new open so I get a second handle (trace "ph-durable.pcap").
*scratches head*
Can you explain this? Am I missing something in the docs? Maybe some
interaction with ChannelSequence?
Thanks!
-slow
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ph-replay-once.pcap
Type: application/vnd.tcpdump.pcap
Size: 11678 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/cifs-protocol/attachments/20250616/305460f5/ph-replay-once.pcap>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dh-replay.pcap
Type: application/vnd.tcpdump.pcap
Size: 11042 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/cifs-protocol/attachments/20250616/305460f5/dh-replay.pcap>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ph-replay.pcap
Type: application/vnd.tcpdump.pcap
Size: 11500 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/cifs-protocol/attachments/20250616/305460f5/ph-replay.pcap>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/cifs-protocol/attachments/20250616/305460f5/OpenPGP_signature.sig>
More information about the cifs-protocol
mailing list