From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6096 invoked by alias); 9 Mar 2015 16:42:35 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 5864 invoked by uid 48); 9 Mar 2015 16:42:28 -0000 From: "konstantin.s.serebryany at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/18043] buffer-overflow (read past the end) in wordexp/parse_dollars/parse_param Date: Mon, 09 Mar 2015 16:42:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.21 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: konstantin.s.serebryany at gmail dot com X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: ppluzhnikov at google dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security+ X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg00079.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18043 Kostya Serebryany changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #7 from Kostya Serebryany --- (In reply to Paul Pluzhnikov from comment #6) > Second case fixed. I've tweaked the fuzzer a bit and it produced something else: pattern: "${Ca+da}" This time reproducible only on glibc trunk so I can't reproduce with valgrind. Can you see it? ==22916==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020001625f2 at pc 0x7f58e333187e bp 0x7fff8223fe90 sp 0x7fff8223fe88 READ of size 1 at 0x6020001625f2 thread T0 #0 0x7f58e333187d in parse_param posix/wordexp.c:1581:18 #1 0x7f58e333187d in parse_dollars posix/wordexp.c:2103 #2 0x7f58e33212ac in parse_glob posix/wordexp.c:490:12 #3 0x7f58e33212ac in wordexp posix/wordexp.c:2416 0x6020001625f2 is located 0 bytes to the right of 2-byte region [0x6020001625f0,0x6020001625f2) allocated by thread T0 here: #0 0x4a1eab in malloc #1 0x7f58e321a546 in __add_to_environ stdlib/setenv.c:202 #2 0x7f58e332d8c3 in parse_param posix/wordexp.c:1916:4 #3 0x7f58e332d8c3 in parse_dollars posix/wordexp.c:2103 #4 0x7f58e332102b in wordexp posix/wordexp.c:2348:10 -- You are receiving this mail because: You are on the CC list for the bug.