[Pkg-samba-maint] [samba] 11/26: CVE-2013-4408:s3:util_tsock: add some overflow detection to tstream_read_packet_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 c4e31eac2bc28c40d51dab732c8c85ab92628ca6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Oct 16 14:17:49 2013 +0200

    CVE-2013-4408:s3:util_tsock: add some overflow detection to tstream_read_packet_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>
---
 source3/lib/util_tsock.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/source3/lib/util_tsock.c b/source3/lib/util_tsock.c
index 35a97f5..03380ef 100644
--- a/source3/lib/util_tsock.c
+++ b/source3/lib/util_tsock.c
@@ -110,6 +110,11 @@ static void tstream_read_packet_done(struct tevent_req *subreq)
 		return;
 	}
 
+	if (total + more < total) {
+		tevent_req_error(req, EMSGSIZE);
+		return;
+	}
+
 	tmp = talloc_realloc(state, state->buf, uint8_t, total+more);
 	if (tevent_req_nomem(tmp, 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