[Pkg-samba-maint] [samba] 12/26: CVE-2013-4408:libcli/util: add some size verification to tstream_read_pdu_blob_done()

Ivo De Decker idd-guest at moszumanska.debian.org
Mon Dec 9 22:22:16 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 bdb643e9cbd4df6c8d6868015d61441cb67dcd66
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Oct 16 14:17:49 2013 +0200

    CVE-2013-4408:libcli/util: add some size verification to tstream_read_pdu_blob_done()
    
    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>
---
 libcli/util/tstream.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libcli/util/tstream.c b/libcli/util/tstream.c
index 12cef9b..dd830e2 100644
--- a/libcli/util/tstream.c
+++ b/libcli/util/tstream.c
@@ -129,6 +129,11 @@ static void tstream_read_pdu_blob_done(struct tevent_req *subreq)
 		return;
 	}
 
+	if (new_buf_size <= old_buf_size) {
+		tevent_req_nterror(req, NT_STATUS_INVALID_BUFFER_SIZE);
+		return;
+	}
+
 	buf = talloc_realloc(state, state->pdu_blob.data, uint8_t, new_buf_size);
 	if (tevent_req_nomem(buf, req)) {
 		return;

-- 
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