[Pkg-samba-maint] [samba] 08/26: CVE-2013-4408:s4:dcerpc_smb2: check for invalid frag_len in send_read_request_continue()

Ivo De Decker idd-guest at moszumanska.debian.org
Mon Dec 9 22:22:15 UTC 2013


This is an automated email from the git hooks/post-receive script.

idd-guest pushed a commit to branch samba_4.1
in repository samba.

commit db102cdd7d94bde35673b751d0a80e5baf560305
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 25 23:25:12 2013 +0200

    CVE-2013-4408:s4:dcerpc_smb2: check for invalid frag_len in send_read_request_continue()
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
---
 source4/librpc/rpc/dcerpc_smb2.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/source4/librpc/rpc/dcerpc_smb2.c b/source4/librpc/rpc/dcerpc_smb2.c
index 473ca78..2b1c66e 100644
--- a/source4/librpc/rpc/dcerpc_smb2.c
+++ b/source4/librpc/rpc/dcerpc_smb2.c
@@ -173,6 +173,12 @@ static NTSTATUS send_read_request_continue(struct dcecli_connection *c, DATA_BLO
 
 	if (state->data.length >= 16) {
 		uint16_t frag_length = dcerpc_get_frag_length(&state->data);
+
+		if (frag_length < state->data.length) {
+			talloc_free(state);
+			return NT_STATUS_RPC_PROTOCOL_ERROR;
+		}
+
 		io.in.length = frag_length - state->data.length;
 	} else {
 		io.in.length = 0x2000;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list