public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regex/18986] New: ERE '0|()0|\1|0' causes regexec undefined behavior
@ 2015-09-20 2:10 eggert at gnu dot org
2015-09-20 18:10 ` [Bug regex/18986] " hanno at hboeck dot de
0 siblings, 1 reply; 2+ messages in thread
From: eggert at gnu dot org @ 2015-09-20 2:10 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18986
Bug ID: 18986
Summary: ERE '0|()0|\1|0' causes regexec undefined behavior
Product: glibc
Version: 2.22
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
Target Milestone: ---
Flags: security+
Created attachment 8621
--> https://sourceware.org/bugzilla/attachment.cgi?id=8621&action=edit
Test program illustrating the bug.
This bug report was inspired by an assertion failure in GNU grep:
http://bugs.gnu.org/21513
I tracked it down to undefined behavior in glibc. Sometimes the behavior
causes a core dump, sometimes the wrong answer, sometimes the right answer. I
will attach a C program that illustrates the problem for me: compile and run
it, and typically it outputs "match (incorrect)"; it should output either
""regcomp returns REG_ESUBREG (arguably correct)" or "no match (arguably
correct)".
I have fixed the bug in the Gnulib version of the regex code, here:
http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=5513b40999149090987a0341c018d05d3eea1272
so when somebody backports Gnulib fixes into Glibc, Glibc should pick up the
bug fix as a part of that process.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-20 18:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-20 2:10 [Bug regex/18986] New: ERE '0|()0|\1|0' causes regexec undefined behavior eggert at gnu dot org
2015-09-20 18:10 ` [Bug regex/18986] " hanno at hboeck dot de
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).