[cifs-protocol] [REG:120050921000038] Clarification on type of offset fields in SMB2_READ/SMB2_WRITE.

Jeff McCashland jeffm at microsoft.com
Sat May 9 00:55:15 UTC 2020


[DocHelp to BCC, support on CC, SR ID on Subject]

Hi Jeremy,

Thank you for your question. We have created SR 120050921000038 to track this issue. I will research the question and let you know what I find. 

Best regards,
Jeff McCashland | Senior Escalation Engineer | Microsoft Protocol Open Specifications Team 
Phone: +1 (425) 703-8300 x38300 | Hours: 9am-5pm | Time zone: (UTC-08:00) Pacific Time (US and Canada)
Local country phone number found here: http://support.microsoft.com/globalenglish | Extension 1138300
We value your feedback.  My manager is Jeremy Chapman (jeremyc), +1 (469) 775-2475

-----Original Message-----
From: Jeremy Allison <jra at samba.org> 
Sent: Friday, May 8, 2020 5:36 PM
To: cifs-protocol <cifs-protocol at lists.samba.org>; Interoperability Documentation Help <dochelp at microsoft.com>; Stefan Metzmacher <metze at samba.org>; jra at samba.org
Subject: [EXTERNAL] Clarification on type of offset fields in SMB2_READ/SMB2_WRITE.

Hi Dochelp,

Currently we're tracking down a really interesting file corruption bug in Windows and MacOSX and an interesting question came up.

In MS-SMB2 the descriptions of SMB2 READ REQUEST and SMB2 WRITE REQUEST say this about the 8 byte offset field:

"Offset (8 bytes): The offset, in bytes, into the file from which the data MUST be read. If the read is being executed on a pipe, the Offset MUST be set to 0 by the client and MUST be ignored by the server."

Does the server treat this field as
signed or unsigned ? The document says
nothing here that I can find (although
maybe I'm looking in the wrong place).

I'm asking as in MS-FSA the algorithms
for "Server Requests a Write" say:

"ByteOffset: The absolute byte offset in the stream where data should be written. ByteOffset could be negative, which means the write should occur at the end of the stream."

Is this describing the interface between the SMB2 server and the NT kernel, or the way the SMB2 server treats the Offset field coming in from the client over the wire ?

It would be really interesting to know
the answer to this question !

Thanks,

Jeremy.



More information about the cifs-protocol mailing list