public inbox for glibc-bugs-regex@sourceware.org
help / color / mirror / Atom feed
From: "konstantin.s.serebryany at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs-regex@sourceware.org
Subject: [Bug regex/18041] New: infinite loop in regcomp/calc_eclosure_iter
Date: Thu, 26 Feb 2015 22:01:00 -0000	[thread overview]
Message-ID: <bug-18041-132@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=18041

            Bug ID: 18041
           Summary: infinite loop in regcomp/calc_eclosure_iter
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: regex
          Assignee: unassigned at sourceware dot org
          Reporter: konstantin.s.serebryany at gmail dot com
                CC: drepper.fsp at gmail dot com

#include <regex.h>
int main() {
  regex_t r;
  const char p[] = {135, 57, 42, 92, 39, 82, 42, 42, 123, 57, 48, 125, 0};
  regcomp(&r, p, 75);
  return 0;
} 

gcc re3.cc && ./a.out  # never ends

...
#253 0x00007ffff7af3c1f in calc_eclosure_iter
(new_set=new_set@entry=0x7fffffffdb80, dfa=dfa@entry=0x602120,
node=node@entry=2, root=root@entry=1) at regcomp.c:1732
#254 0x00007ffff7af7847 in calc_eclosure (dfa=<optimized out>) at
regcomp.c:1672
#255 analyze (preg=<optimized out>) at regcomp.c:1198
#256 re_compile_internal (preg=preg@entry=0x7fffffffdc80,
pattern=pattern@entry=0x7fffffffdcc0 "\207\071*\\'R**{90}", length=<optimized
out>, syntax=syntax@entry=4436732) at regcomp.c:804
#257 0x00007ffff7af8a80 in __regcomp (preg=0x7fffffffdc80,
pattern=0x7fffffffdcc0 "\207\071*\\'R**{90}", cflags=<optimized out>) at
regcomp.c:506
#258 0x0000000000400601 in main ()

2.19 and fresh trunk are affected. 
Found with the same fuzzer as bugs 18032, 18036, 18037, 18040

-- 
You are receiving this mail because:
You are on the CC list for the bug.


             reply	other threads:[~2015-02-26 22:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26 22:01 konstantin.s.serebryany at gmail dot com [this message]
2015-03-02 10:37 ` [Bug regex/18041] " fweimer at redhat dot com
2015-03-02 10:37 ` fweimer at redhat dot com
2015-03-10 22:27 ` konstantin.s.serebryany at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-18041-132@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs-regex@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).