[cifs-protocol] [MS-CIFS] PendingRequestTable issues.

Christopher R. Hertel crh at samba.org
Thu Mar 1 14:36:55 MST 2012


[Resending the message below due to a typo in the address.]

Dochelp,

In section 3.3.5.20 of [MS-CIFS] (Receiving an SMB_COM_PROCESS_EXIT 
Request), there is the following statement:

   The server MUST search the Server.Connection.PendingRequestTable for
   any pending commands that have the same UID, TID, PID, and MID as
   presented in the request. If the SMB transport is connectionless,
   the header SID value SHOULD<264> also be used. For each matching
   entry, the server MUST abort the pending operation. The client
   process that made the aborted command request no longer exists to
   receive the response.

There are two problems with the above statement.

1) For connectionless transports, you would use the CID value.  The
    CID is the Connection ID, used to identify a connection context
    over a connectionless transport.  The SID is a search ID.

2) The server must search the Server.Connection.PendingRequestTable
    for *all* pending requests under the same PID.  It is the PID
    that is being closed.  If you only look for those matching all
    of [PID, MID, UID, TID], as presented in the Exit request, you
    have the following problems:
    * There is no SID value presented in the SMB_COM_PROCESS_EXIT,
      but there is a CID in the header.  More evidence that you
      want CID not SID.
    * No UID or TID are presented in the SMB_COM_PROCESS_EXIT
      request, so you *cannot* match on those fields.
    * The SMB_COM_PROCESS_EXIT is specific to a process, not a
      MID within a process.  A single process may use several MIDs
      to identify threads within the process.

    So, above should read:


   The server MUST search the Server.Connection.PendingRequestTable for
   any pending commands that have the same PID as presented in the
   request header. If the SMB transport is connectionless, the header
   CID value SHOULD<264> also be used. For each matching entry, the
   server MUST abort the pending operation. The client process that
   made the aborted command request no longer exists to receive the
   response to the pending operations.

Please not that the SID->CID change also impacts Windows Behavior Note 
<264>, which should read:

   <264> Section 3.3.5.20: Windows NT Server 4.0 does not use the CID
   as a lookup key. The list of pending requests is associated with
   the SMB transport, so the effect is the same.

(That is, SID should be CID in that note.  The note is otherwise correct.)

Chris -)-----

-- 
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org


More information about the cifs-protocol mailing list