bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Assaf Gordon <assafgordon@gmail.com>
To: Hongxu Chen <leftcopy.chx@gmail.com>,
	34141@debbugs.gnu.org,
	"bug-gnulib@gnu.org List" <bug-gnulib@gnu.org>
Subject: Re: bug#34141: Stackoverflow triggered at lib/regexec.c:1948
Date: Sun, 20 Jan 2019 02:20:57 -0700	[thread overview]
Message-ID: <72cf66e3-13f6-cc09-5e14-12f74d3afa2d@gmail.com> (raw)
In-Reply-To: <CAJPBKOFUAV6f1BRt21iyGwyRS+QGrcVz4WqEfkYvkyqtCs_mLA@mail.gmail.com>

(forwarding to gnulib)

Hello,

Hongxu Chen reported a stack-overflow in regexec.
I suspect it is the same as the one reported here:
   https://lists.gnu.org/r/bug-gnulib/2018-09/msg00066.html

But just in case, the full report is below.

regards,
  - assaf

On 2019-01-19 10:58 p.m., Hongxu Chen wrote:
> Hi,
> 
>      Latest sed (4.7.4-f8503-dirty; and prior to this, e.g. 4.4) may trigger
> a stack overflow error by executing the following command.
> 
>      echo 0 | ./sed '/\(\)\(\1\(\)\1\(\)\)*/c0'    # equivalently sed -f
> c01.sed c01.in
> 
>      ASan reports like this:
> AddressSanitizer:DEADLYSIGNAL
> 
> 
> 
> =================================================================
> 
> 
> 
> ==26879==ERROR: AddressSanitizer: stack-overflow on address 0x7ffea609bff8
> (pc 0x0000005b0b76 bp 0x7ffea609c090 sp 0x7ffea609bf20 T0)
> 
> 
>      #0 0x5b0b75 in check_dst_limits_calc_pos_1
> /home/hongxu/FOT/sed-O0/./lib/regexec.c:1912:18
> 
> 
>      #1 0x5b0ed3 in check_dst_limits_calc_pos_1
> /home/hongxu/FOT/sed-O0/./lib/regexec.c:1948:7
> 
> 
>      #2 0x5b0ed3 in check_dst_limits_calc_pos_1
> /home/hongxu/FOT/sed-O0/./lib/regexec.c:1948:7
> 
> 
>      #3 0x5b0ed3 in check_dst_limits_calc_pos_1
> /home/hongxu/FOT/sed-O0/./lib/regexec.c:1948:7
> 
> 
>      #4 0x5b0ed3 in check_dst_limits_calc_pos_1
> /home/hongxu/FOT/sed-O0/./lib/regexec.c:1948:7
> 
> 
>      #5 0x5b0ed3 in check_dst_limits_calc_pos_1
> /home/hongxu/FOT/sed-O0/./lib/regexec.c:1948:7
> 
> 
>      #6 0x5b0ed3 in check_dst_limits_calc_pos_1
> /home/hongxu/FOT/sed-O0/./lib/regexec.c:1948:7
> 
> 
>      #7 0x5b0ed3 in check_dst_limits_calc_pos_1
> /home/hongxu/FOT/sed-O0/./lib/regexec.c:1948:7
> ...
>      #247 0x5b0ed3 in check_dst_limits_calc_pos_1
> /home/hongxu/FOT/sed-O0/./lib/regexec.c:1948:7
> 
> 
>      #248 0x5b0ed3 in check_dst_limits_calc_pos_1
> /home/hongxu/FOT/sed-O0/./lib/regexec.c:1948:7
> 
> 
>      #249 0x5b0ed3 in check_dst_limits_calc_pos_1
> /home/hongxu/FOT/sed-O0/./lib/regexec.c:1948:7
> 
> 
> 
> 
> 
> 
> SUMMARY: AddressSanitizer: stack-overflow
> /home/hongxu/FOT/sed-O0/./lib/regexec.c:1912:18 in
> check_dst_limits_calc_pos_1
> 
> ==26879==ABORTING
> 
> Best Regards,
> Hongxu
> 



           reply	other threads:[~2019-01-20  9:21 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CAJPBKOFUAV6f1BRt21iyGwyRS+QGrcVz4WqEfkYvkyqtCs_mLA@mail.gmail.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

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

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

  git send-email \
    --in-reply-to=72cf66e3-13f6-cc09-5e14-12f74d3afa2d@gmail.com \
    --to=assafgordon@gmail.com \
    --cc=34141@debbugs.gnu.org \
    --cc=bug-gnulib@gnu.org \
    --cc=leftcopy.chx@gmail.com \
    /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).