Actions
Bug #11659
closedSMB2 protocol version negotiation needs work
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
No response is emitted when a NEGOTIATE request is received with dialects that are unsupported. This appears to be due to the fact that the response header is not properly initialised. The code also attempts to respond with NT_STATUS_INVALID_PARAMETER:
best_version = smb2_find_best_dialect(s, cl_versions, version_cnt); if (best_version == 0) { cmn_err(CE_NOTE, "clnt %s no supported dialect", sr->session->ip_addr_str); sr->smb2_status = NT_STATUS_INVALID_PARAMETER; rc = -1; goto errout; }
Whereas the correct response is NT_STATUS_NOT_SUPPORTED:
The server MUST select the greatest common dialect between the dialects it implements and the Dialects array of the SMB2 NEGOTIATE request. If a common dialect is not found, the server MUST fail the request with STATUS_NOT_SUPPORTED.
We also do not properly handle the cases where no dialect is given and drop the connection when we should leave it open.
This will be fixed as part of #11665.
Related issues
Actions