public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Raluca-Petronela Florea <florea.raluca.petronela@gmail.com>
To: libc-alpha@sourceware.org, adhemerval.zanella@linaro.org,
	 debian-glibc@lists.debian.org
Subject: Glibc - CVE-2015-8985 help
Date: Tue, 5 May 2020 12:14:30 +0300	[thread overview]
Message-ID: <CAF=qhUjXSpAFOmwobY7TgzvT0FVS08zJHFfO3P2zrUmi1UxKiA@mail.gmail.com> (raw)

Hello,

I'm working on fixing some GLIBC vulnerabilities and I have an issue
regarding
CVE-2015-8985 - Assertion failure in pop_fail_stack when executing a
malformed regexp

Although it seems to be fixed in glibc 2.28, I've encountered the following
issue testing on a Ubuntu 19.10 virtual machine with glibc 2.30-0ubuntu.2.1
the following program:

pop_fail_stack.c

#include <assert.h>
#include <regex.h>
#include <stdio.h>

int main(int argc, char **argv)
{
    int rc;
    regex_t preg;
    regmatch_t pmatch[2];

    rc = regcomp(&preg, "()*)|\\1)*", REG_EXTENDED);
    assert(rc == 0);
    regexec(&preg, "", 2, pmatch, 0);
    regfree(&preg);
    return 0;
}

*pop_fail_stack: pop_fail_stack.c:12: main: Assertion `rc == 0' failed.*
*Aborted (core dumped)*

As describes the Debian bug
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779392), the test
program compiles an invalid regexp and then tries to match a string
against it, triggers an assertion:

*pop_fail_stack: regexec.c:1401: pop_fail_stack: Assertion `num >= 0' failed.
Aborted*

So, in my scenario, the test program does not even successfully
compile the invalid regexp.

Did anyone encounter this issue?

Could you please help me with this?


Thank you,
Raluca

             reply	other threads:[~2020-05-05  9:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05  9:14 Raluca-Petronela Florea [this message]
2020-05-05 10:23 ` Aurelien Jarno
2020-05-05 10:46   ` Raluca-Petronela Florea
2020-05-05 10:59     ` Raluca-Petronela Florea

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='CAF=qhUjXSpAFOmwobY7TgzvT0FVS08zJHFfO3P2zrUmi1UxKiA@mail.gmail.com' \
    --to=florea.raluca.petronela@gmail.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=debian-glibc@lists.debian.org \
    --cc=libc-alpha@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).