From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25447 invoked by alias); 7 Sep 2014 23:47:09 -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 25396 invoked by uid 48); 7 Sep 2014 23:47:05 -0000 From: "eggert at gnu dot org" To: glibc-bugs@sourceware.org Subject: [Bug regex/17356] New: regex assertion violation with triple backreferences Date: Sun, 07 Sep 2014 23:47:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: regex X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eggert at gnu dot org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security+ X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc flagtypes.name attachments.created Message-ID: 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: 2014-09/txt/msg00149.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17356 Bug ID: 17356 Summary: regex assertion violation with triple backreferences Product: glibc Version: unspecified Status: NEW Severity: normal Priority: P2 Component: regex Assignee: unassigned at sourceware dot org Reporter: eggert at gnu dot org CC: drepper.fsp at gmail dot com Flags: security+ Created attachment 7772 --> https://sourceware.org/bugzilla/attachment.cgi?id=7772&action=edit Test for triple backreference regex bug The attached program, which is a strictly conforming use of the POSIX regular expression matcher, has undefined behavior with glibc. On Fedora 20 x86-64 it simply dumps core; on Ubuntu 14.04 x86-64 it outputs "regexec.c:1386: pop_fail_stack: Assertion `num >= 0' failed" and then dumps core. It works fine on Solaris and AIX. I expect that this bug has been in all glibc versions since Isamu Hasegawa's circa-2002 rewrite of the regex code, and that the bug is in glibc 2.20 too, though I haven't tested this. Fixing this bug will not be trivial, I'm afraid. I have not succeeded in tracking down Mr. Hasegawa. -- You are receiving this mail because: You are on the CC list for the bug.