From f6afda0bc867f1080c45e1f6f79d5032c41d2b1a Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Mon, 27 Feb 2012 17:51:40 -0800 Subject: s3:smb2_server verify creditcharge for all requests that have max_???? checks, also do a check of the creditcharge the client has sent (when using largemtu) Signed-off-by: Jeremy Allison --- source3/smbd/smb2_getinfo.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/smbd/smb2_getinfo.c') diff --git a/source3/smbd/smb2_getinfo.c b/source3/smbd/smb2_getinfo.c index 7d0f946898..e8d918df38 100644 --- a/source3/smbd/smb2_getinfo.c +++ b/source3/smbd/smb2_getinfo.c @@ -97,6 +97,12 @@ NTSTATUS smbd_smb2_request_process_getinfo(struct smbd_smb2_request *req) return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER); } + status = smbd_smb2_request_verify_creditcharge(req, + MAX(in_input_buffer.length,in_output_buffer_length)); + if (!NT_STATUS_IS_OK(status)) { + return smbd_smb2_request_error(req, status); + } + if (req->compat_chain_fsp) { /* skip check */ } else if (in_file_id_persistent != in_file_id_volatile) { -- cgit