3.3.5.15.12 Handling a Validate Negotiate Info Request

This section applies only to servers that implement the SMB 3.x dialect family.

When the server receives a request with an SMB2 header with a Command value equal to SMB2 IOCTL, and a CtlCode of FSCTL_VALIDATE_NEGOTIATE_INFO, message handling proceeds as follows:

  • If Connection.Dialect is "3.1.1", the server MUST terminate the transport connection and free the Connection object.

  • If MaxOutputResponse in the IOCTL request is less than the size of a VALIDATE_NEGOTIATE_INFO Response, the server MUST terminate the transport connection and free the Connection object.

  • If the server implements the SMB 3.1.1 dialect and if the Dialects array of the VALIDATE_NEGOTIATE_INFO request structure is not equal to Connection.ClientDialects, the server MUST terminate the transport connection and free the Connection object. Otherwise, the server MUST determine the greatest common dialect between the dialects it implements and the Dialects array of the VALIDATE_NEGOTIATE_INFO request. If no dialect is matched, or if the value is not equal to Connection.Dialect, the server MUST terminate the transport connection and free the Connection object.

  • If the Guid received in the VALIDATE_NEGOTIATE_INFO request structure is not equal to the Connection.ClientGuid, the server MUST terminate the transport connection and free the Connection object.

  • If the SecurityMode received in the VALIDATE_NEGOTIATE_INFO request structure is not equal to Connection.ClientSecurityMode, the server MUST terminate the transport connection and free the Connection object.

  • If Connection.ClientCapabilities is not equal to the Capabilities received in the VALIDATE_NEGOTIATE_INFO request structure, the server MUST terminate the transport connection and free the Connection object.

The server MUST construct the VALIDATE_NEGOTIATE_INFO Response specified in section 2.2.32.6, as follows:

  • Capabilities is set to Connection.ServerCapabilities.

  • Guid is set to ServerGuid.

  • SecurityMode is set to Connection.ServerSecurityMode.

  • Dialect is set to Connection.Dialect.

The server MUST then construct an SMB2 IOCTL response following the syntax specified in section 2.2.32, with the following values:

  • CtlCode MUST be set to FSCTL_VALIDATE_NEGOTIATE_INFO.

  • FileId MUST be set to { 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF }.

  • InputOffset SHOULD be set to the offset, in bytes, from the beginning of the SMB2 header to the Buffer[] field of the response.

  • InputCount SHOULD be set to zero.

  • OutputOffset MUST be set to InputOffset + InputCount, rounded up to a multiple of 8.

  • OutputCount MUST be set to the size of the VALIDATE_NEGOTIATE_INFO response that is constructed as above.

  • Flags MUST be set to zero.

  • The server MUST copy the constructed VALIDATE_NEGOTIATE_INFO Response structure into the Buffer field at the OutputOffset computed above.

The response MUST be sent to the client.

Show: