You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
runtime error: signed integer overflow: 1 + 9223372036854775807 cannot be represented in type 'long' (regcomp.c:5935:23) #16113
While fuzzing v5.27.2-135-g7aaa36b196*, undefined-behavior was triggered in
the form of a signed integer overflow in regcomp.c, however I'm not sure if
this is a bug.
./perl -e "0=~'0(0?(0||00*))|'"
regcomp.c:5935:23: runtime error: signed integer overflow: 1 +
9223372036854775807 cannot be represented in type 'long'
#0 0xa5aa70 in S_study_chunk /root/perl5/regcomp.c:5935:23 #1 0xa6df1c in S_study_chunk /root/perl5/regcomp.c:5894:35 #2 0x9d6c65 in Perl_re_op_compile /root/perl5/regcomp.c:7574:11 #3 0x56abc9 in Perl_pmruntime /root/perl5/op.c:5885:6 #4 0x56413d in Perl_bind_match /root/perl5/op.c:4017:9 #5 0x96ddc0 in Perl_yyparse /root/perl5/perly.y:990:23 #6 0x6c1dfe in S_parse_body /root/perl5/perl.c:2414:9 #7 0x6aeb39 in perl_parse /root/perl5/perl.c:1732:2 #8 0x5251b6 in main /root/perl5/perlmain.c:121:18 #9 0x7fe7401094d9 in __libc_start_main (/lib64/libc.so.6+0x204d9) #10 0x4359d9 in _start (/root/perl5/perl+0x4359d9)
On Sun, 13 Aug 2017 19:33:16 -0700, brian.carpenter@gmail.com wrote:
While fuzzing v5.27.2-135-g7aaa36b196*, undefined-behavior was triggered in
the form of a signed integer overflow in regcomp.c, however I'm not sure if
this is a bug.
./perl -e "0=~'0(0?(0||00*))|'"
The attached fixes it for me.
There's other similar issues, perhaps it's finally time to do the work to close 121505.
Activity
p5pRT commentedon Aug 14, 2017
From @geeknik
While fuzzing v5.27.2-135-g7aaa36b196*, undefined-behavior was triggered in
the form of a signed integer overflow in regcomp.c, however I'm not sure if
this is a bug.
./perl -e "0=~'0(0?(0||00*))|'"
regcomp.c:5935:23: runtime error: signed integer overflow: 1 +
9223372036854775807 cannot be represented in type 'long'
#0 0xa5aa70 in S_study_chunk /root/perl5/regcomp.c:5935:23
#1 0xa6df1c in S_study_chunk /root/perl5/regcomp.c:5894:35
#2 0x9d6c65 in Perl_re_op_compile /root/perl5/regcomp.c:7574:11
#3 0x56abc9 in Perl_pmruntime /root/perl5/op.c:5885:6
#4 0x56413d in Perl_bind_match /root/perl5/op.c:4017:9
#5 0x96ddc0 in Perl_yyparse /root/perl5/perly.y:990:23
#6 0x6c1dfe in S_parse_body /root/perl5/perl.c:2414:9
#7 0x6aeb39 in perl_parse /root/perl5/perl.c:1732:2
#8 0x5251b6 in main /root/perl5/perlmain.c:121:18
#9 0x7fe7401094d9 in __libc_start_main (/lib64/libc.so.6+0x204d9)
#10 0x4359d9 in _start (/root/perl5/perl+0x4359d9)
SUMMARY: AddressSanitizer: undefined-behavior regcomp.c:5935:23
p5pRT commentedon Aug 14, 2017
From zefram@fysh.org
Brian Carpenter wrote:
There's nothing pathological about that regexp. I reckon it's a bug.
-zefram
p5pRT commentedon Aug 14, 2017
The RT System itself - Status changed from 'new' to 'open'
p5pRT commentedon Aug 14, 2017
From @tonycoz
On Sun, 13 Aug 2017 19:33:16 -0700, brian.carpenter@gmail.com wrote:
The attached fixes it for me.
There's other similar issues, perhaps it's finally time to do the work to close 121505.
Tony
p5pRT commentedon Aug 14, 2017
From @tonycoz
0001-perl-131893-prevent-integer-overflow-when-compiling-.patch
p5pRT commentedon Dec 6, 2017
From zefram@fysh.org
Tony's patch looks good to me. I've applied it as commit
6c4f4eb.
-zefram
p5pRT commentedon Dec 7, 2017
@cpansprout - Status changed from 'open' to 'pending release'
p5pRT commentedon Jun 23, 2018
From @khwilliamson
Thank you for filing this report. You have helped make Perl better.
With the release yesterday of Perl 5.28.0, this and 185 other issues have been
resolved.
Perl 5.28.0 may be downloaded via:
https://metacpan.org/release/XSAWYERX/perl-5.28.0
If you find that the problem persists, feel free to reopen this ticket.
p5pRT commentedon Jun 23, 2018
@khwilliamson - Status changed from 'pending release' to 'resolved'