-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIGFPE integer divide by zero in S_make_trie #14945
Comments
From @dcollinsnGreetings Porters, I have compiled bleadperl with the afl-gcc compiler using: ./Configure -Dusedevel -Dprefix='/usr/local/perl-afl' -Dcc='ccache afl-gcc' -Duselongdouble -Duse64bitint -Doptimize=-g -Uversiononly -Uman1dir -Uman3dir -des And then fuzzed the resulting binary using: AFL_NO_VAR_CHECK=1 afl-fuzz -i in -o out bin/perl @@ After reducing testcases using `afl-tmin` and performing additional minimization by hand, I have located the following testcase that triggers a floating point exception in the perl interpreter. The testcase is the attached 11-character file: dcollins@nagios:~/perl$ od -c /usr/local/perl-afl/out/allcrash/f3i000002 This is very similar to [perl #125990], however this testcase never triggered that bug, and was presumably missed when the fuzzer found it alongside the many testcases that did. A debugging perl produces no other interesting output. The version of 5.20.2 that shipped with my Debian does not have this bug. The result of a bisect run is shown below, and the problem does arise from the same commit, where \N{} forces /d to /u. **GDB** dcollins@nagios:~/perl$ gdb --args ./perl /usr/local/perl-afl/out/allcrash/f3i000002 Program received signal SIGFPE, Arithmetic exception. **VALGRIND** dcollins@nagios:~/perl$ valgrind ./perl /usr/local/perl-afl/out/allcrash/f3i000002 **BISECT** 75697d6 is the first bad commit Empty \N{} in regex pattern should force /d to /u :100644 100644 e6ddb803aae9f37f00d2f0f38fd109f05bf0bcb6 c2521a97ccee8d15370822c3b975be2628fcddb2 M regcomp.c **PERL -V** dcollins@nagios:~/perl$ ./perl -V Characteristics of this binary (from libperl): |
From @dcollinsn |
From @dcollinsnA simpler testcase: /\N{}Ss|/i ** GDB ** Starting program: /usr/local/perl-afl/bin/perl -e /\\N\{\}Ss\|/i Program received signal SIGFPE, Arithmetic exception. ** VALGRIND ** ==15719== Memcheck, a memory error detector ** PERL -V ** Summary of my perl5 (revision 5 version 23 subversion 4) configuration: Characteristics of this binary (from libperl): |
@khwilliamson - Status changed from 'new' to 'open' |
From @demerphq\N{} was creating an EMPTY node, which was tickling a secondary issue with trie construction from alternations with EXACTFU_SS nodes in them. commit 944e05e Fix Perl #126206: handle NOTHING regops and EXACTFU_SS regops in make_trie() properly |
@demerphq - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#126206 (status was 'resolved')
Searchable as RT126206$
The text was updated successfully, but these errors were encountered: