diff options
-rw-r--r-- | source4/smb_server/smb2/receive.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/smb_server/smb2/receive.c b/source4/smb_server/smb2/receive.c index 16f888b0a6e..5ac01dcb7c9 100644 --- a/source4/smb_server/smb2/receive.c +++ b/source4/smb_server/smb2/receive.c @@ -470,6 +470,7 @@ NTSTATUS smbsrv_recv_smb2_request(void *private_data, DATA_BLOB blob) uint32_t protocol_version; uint16_t buffer_code; uint32_t dynamic_size; + uint32_t flags; smb_conn->statistics.last_request_time = cur_time; @@ -543,6 +544,12 @@ NTSTATUS smbsrv_recv_smb2_request(void *private_data, DATA_BLOB blob) * - make sure it's a request */ + flags = IVAL(req->in.hdr, SMB2_HDR_FLAGS); + /* the first request should never have the related flag set */ + if (flags & SMB2_HDR_FLAG_CHAINED) { + req->chain_status = NT_STATUS_INVALID_PARAMETER; + } + return smb2srv_reply(req); } |