develooper Front page | perl.perl5.porters | Postings from June 2019

[perl #134212] Failed making perl5 at lib/buildcustomize.pl

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
June 22, 2019 14:14
Subject:
[perl #134212] Failed making perl5 at lib/buildcustomize.pl
Message ID:
rt-4.0.24-4542-1561212875-1430.134212-15-0@perl.org
On Thu, 20 Jun 2019 09:44:34 GMT, imdb95@gmail.com wrote:
> From: imdb95@gmail.com
> Message-Id: <5.22.1_17412_1561023304@instance-2>
> Reply-To: imdb95@gmail.com
> To: perlbug@perl.org
> 
> 
> This is a bug report for perl from imdb95@gmail.com,
> generated with the help of perlbug 1.40 running under perl 5.22.1.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> I am trying to build Perl with American Fuzzing Lop, but have failed.
> I write this report with builtin perlbug.
> Clang+llvm:  clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-16.04 (
> http://releases.llvm.org/4.0.0/clang+llvm-4.0.0-x86_64-linux-gnu-
> ubuntu-16.04.tar.xz
> )
> AFL: afl-2.52b
> The version I want to build is: perl 5, version 31, subversion 1
> *******************************
> ./miniperl -v
> 
> This is perl 5, version 31, subversion 1 (v5.31.1 (UNKNOWN-miniperl))
> built
> for x86_64-linux
> *******************************
> Following is building log:
> ********************************
> [Run]: AFL_USE_ASAN=1 ./Configure -des -Dusedevel -DDEBUGGING
> -Dcc=afl-clang-fast -Doptimize=-g
> [Output]: => Success
> 
> [Run]: AFL_USE_ASAN=1 make
> [Output]:
> ...
> afl-clang-fast -fstack-protector-strong -L/usr/local/lib -o miniperl \
>     opmini.o perlmini.o  gv.o toke.o perly.o pad.o regcomp.o dump.o
> util.o
> mg.o reentr.o mro_core.o keywords.o hv.o
>  av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o
> regexec.o utf8.o taint.o deb.o universal.o g
> lobals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o
> pp_sort.o caretx.o dquote.o time64.o  miniperlma
> in.o  -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
> afl-clang-fast 2.52b by <lszekeres@google.com>
> ./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c
> 'echo
> > &2 Failed to build miniperl.  Please ru
> n make minitest; exit 1'
> =================================================================
> ==16743==ERROR: AddressSanitizer: heap-use-after-free on address
> 0x6020000006b0 at pc 0x00000045c609 bp 0x7fff1fe02
> b50 sp 0x7fff1fe022f8
> READ of size 2 at 0x6020000006b0 thread T0
>     #0 0x45c608 in __interceptor_setlocale
> /scratch/llvm/clang-4/xenial/final/llvm.src/projects/compiler-
> rt/lib/asa
> n/../sanitizer_common/sanitizer_common_interceptors.inc:2875:5
>     #1 0x887905 in Perl_upg_version /root/Fuzz/perl/./vutil.c:717:17
>     #2 0x8853ed in Perl_new_version /root/Fuzz/perl/./vutil.c:551:12
>     #3 0xb31ee3 in S_require_version /root/Fuzz/perl/pp_ctl.c:3719:10
>     #4 0xb31ee3 in Perl_pp_require /root/Fuzz/perl/pp_ctl.c:4345
>     #5 0x863dbc in Perl_runops_debug /root/Fuzz/perl/dump.c:2537:23
>     #6 0x5d0f4c in Perl_call_sv /root/Fuzz/perl/perl.c:3043:6
>     #7 0x5bbc7d in Perl_call_list /root/Fuzz/perl/perl.c:5077:6
>     #8 0x56962e in S_process_special_blocks
> /root/Fuzz/perl/op.c:10469:6
>     #9 0x539626 in Perl_newATTRSUB_x /root/Fuzz/perl/op.c:10395:21
>     #10 0x541522 in Perl_utilize /root/Fuzz/perl/op.c:7590:5
>     #11 0x6dfaa0 in Perl_yyparse /root/Fuzz/perl/perly.y:336:6
>     #12 0x5c88c4 in S_parse_body /root/Fuzz/perl/perl.c:2531:9
>     #13 0x5bf965 in perl_parse /root/Fuzz/perl/perl.c:1822:2
>     #14 0xde129c in main /root/Fuzz/perl/miniperlmain.c:132:10
>     #15 0x7f21e137a82f in __libc_start_main
> (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
>     #16 0x41c358 in _start (/root/Fuzz/perl/miniperl+0x41c358)
> 
> 0x6020000006b0 is located 0 bytes inside of 8-byte region
> [0x6020000006b0,0x6020000006b8)
> freed by thread T0 here:
>     #0 0x4c2d0b in __interceptor_free
> /scratch/llvm/clang-4/xenial/final/llvm.src/projects/compiler-
> rt/lib/asan/asa
> n_malloc_linux.cc:47:3
>     #1 0x7f21e1385049 in setlocale (/lib/x86_64-linux-
> gnu/libc.so.6+0x2b049)
> previously allocated by thread T0 here:
>     #0 0x4c305c in malloc
> /scratch/llvm/clang-4/xenial/final/llvm.src/projects/compiler-
> rt/lib/asan/asan_malloc_lin
> ux.cc:66:3
>     #1 0x7f21e13e5489 in __strdup (/lib/x86_64-linux-
> gnu/libc.so.6+0x8b489)
>     #2 0x524f4c4f435f534b  (<unknown module>)
> SUMMARY: AddressSanitizer: heap-use-after-free
> /scratch/llvm/clang-4/xenial/final/llvm.src/projects/compiler-rt/lib
> /asan/../sanitizer_common/sanitizer_common_interceptors.inc:2875:5 in
> __interceptor_setlocale
> Shadow bytes around the buggy address:
>   0x0c047fff8080: fa fa 00 fa fa fa 00 fa fa fa fd fa fa fa fd fa
>   0x0c047fff8090: fa fa 00 fa fa fa 00 fa fa fa fd fa fa fa fd fa
>   0x0c047fff80a0: fa fa 00 fa fa fa 00 fa fa fa fd fa fa fa fd fa
>   0x0c047fff80b0: fa fa 00 fa fa fa 00 fa fa fa fd fa fa fa fd fa
>   0x0c047fff80c0: fa fa 00 fa fa fa 00 fa fa fa fd fa fa fa fd fa
> =>0x0c047fff80d0: fa fa 00 fa fa fa[fd]fa fa fa fd fa fa fa fd fa
>   0x0c047fff80e0: fa fa 00 fa fa fa 00 fa fa fa fd fa fa fa fd fa
>   0x0c047fff80f0: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
>   0x0c047fff8100: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
>   0x0c047fff8110: fa fa fd fa fa fa fd fa fa fa fd fa fa fa 06 fa
>   0x0c047fff8120: fa fa 00 fa fa fa fd fa fa fa 00 fa fa fa fd fa
> Shadow byte legend (one shadow byte represents 8 application bytes):
>   Addressable: 00
>   Partially addressable: 01 02 03 04 05 06 07
>   Heap left redzone:  fa
>   Freed heap region:  fd
>   Stack left redzone:  f1
>   Stack mid redzone:  f2
>   Stack right redzone:  f3
>   Stack after return:  f5
>   Stack use after scope:   f8
>   Global redzone:  f9
>   Global init order:  f6
>   Poisoned by user:  f7
>   Container overflow:  fc
>   Array cookie:   ac
>   Intra object redzone:    bb
>   ASan internal:  fe
>   Left alloca redzone:  ca
>   Right alloca redzone:    cb
> ==16743==ABORTING
> Failed to build miniperl. Please run make minitest
> makefile:362: recipe for target 'lib/buildcustomize.pl' failed
> make: *** [lib/buildcustomize.pl] Error 1
> root@instance-2:~/Fuzz/perl# AFL_USE_ASAN=1 make
> afl-clang-fast -fstack-protector-strong -L/usr/local/lib -o miniperl \
>     opmini.o perlmini.o  gv.o toke.o perly.o pad.o regcomp.o dump.o
> util.o
> mg.o reentr.o mro_core.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o
> scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o
> universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o
> pp_pack.o pp_sort.o caretx.o dquote.o time64.o  miniperlmain.o
> -lpthread
> -lnsl -ldl -lm -lcrypt -lutil -lc
> afl-clang-fast 2.52b by <lszekeres@google.com>
> ./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c
> 'echo
> > &2 Failed to build miniperl.  Please run make minitest; exit 1'
> =================================================================
> ==16751==ERROR: AddressSanitizer: heap-use-after-free on address
> 0x6020000006b0 at pc 0x00000045c609 bp 0x7fffe6381650 sp
> 0x7fffe6380df8
> READ of size 2 at 0x6020000006b0 thread T0
>     #0 0x45c608 in __interceptor_setlocale
> /scratch/llvm/clang-4/xenial/final/llvm.src/projects/compiler-
> rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:2875:5
>     #1 0x887905 in Perl_upg_version /root/Fuzz/perl/./vutil.c:717:17
>     #2 0x8853ed in Perl_new_version /root/Fuzz/perl/./vutil.c:551:12
>     #3 0xb31ee3 in S_require_version /root/Fuzz/perl/pp_ctl.c:3719:10
>     #4 0xb31ee3 in Perl_pp_require /root/Fuzz/perl/pp_ctl.c:4345
>     #5 0x863dbc in Perl_runops_debug /root/Fuzz/perl/dump.c:2537:23
>     #6 0x5d0f4c in Perl_call_sv /root/Fuzz/perl/perl.c:3043:6
>     #7 0x5bbc7d in Perl_call_list /root/Fuzz/perl/perl.c:5077:6
>     #8 0x56962e in S_process_special_blocks
> /root/Fuzz/perl/op.c:10469:6
>     #9 0x539626 in Perl_newATTRSUB_x /root/Fuzz/perl/op.c:10395:21
>     #10 0x541522 in Perl_utilize /root/Fuzz/perl/op.c:7590:5
>     #11 0x6dfaa0 in Perl_yyparse /root/Fuzz/perl/perly.y:336:6
>     #12 0x5c88c4 in S_parse_body /root/Fuzz/perl/perl.c:2531:9
>     #13 0x5bf965 in perl_parse /root/Fuzz/perl/perl.c:1822:2
>     #14 0xde129c in main /root/Fuzz/perl/miniperlmain.c:132:10
>     #15 0x7fb02aac582f in __libc_start_main
> (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
>     #16 0x41c358 in _start (/root/Fuzz/perl/miniperl+0x41c358)
> 
> 0x6020000006b0 is located 0 bytes inside of 8-byte region
> [0x6020000006b0,0x6020000006b8)
> freed by thread T0 here:
>     #0 0x4c2d0b in __interceptor_free
> /scratch/llvm/clang-4/xenial/final/llvm.src/projects/compiler-
> rt/lib/asan/asan_malloc_linux.cc:47:3
>     #1 0x7fb02aad0049 in setlocale (/lib/x86_64-linux-
> gnu/libc.so.6+0x2b049)
> 
> previously allocated by thread T0 here:
>     #0 0x4c305c in malloc
> /scratch/llvm/clang-4/xenial/final/llvm.src/projects/compiler-
> rt/lib/asan/asan_malloc_linux.cc:66:3
>     #1 0x7fb02ab30489 in __strdup (/lib/x86_64-linux-
> gnu/libc.so.6+0x8b489)
>     #2 0x524f4c4f435f534b  (<unknown module>)
> 
> SUMMARY: AddressSanitizer: heap-use-after-free
> /scratch/llvm/clang-4/xenial/final/llvm.src/projects/compiler-
> rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:2875:5
> in __interceptor_setlocale
> Shadow bytes around the buggy address:
>   0x0c047fff8080: fa fa 00 fa fa fa 00 fa fa fa fd fa fa fa fd fa
>   0x0c047fff8090: fa fa 00 fa fa fa 00 fa fa fa fd fa fa fa fd fa
>   0x0c047fff80a0: fa fa 00 fa fa fa 00 fa fa fa fd fa fa fa fd fa
>   0x0c047fff80b0: fa fa 00 fa fa fa 00 fa fa fa fd fa fa fa fd fa
>   0x0c047fff80c0: fa fa 00 fa fa fa 00 fa fa fa fd fa fa fa fd fa
> =>0x0c047fff80d0: fa fa 00 fa fa fa[fd]fa fa fa fd fa fa fa fd fa
>   0x0c047fff80e0: fa fa 00 fa fa fa 00 fa fa fa fd fa fa fa fd fa
>   0x0c047fff80f0: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
>   0x0c047fff8100: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
>   0x0c047fff8110: fa fa fd fa fa fa fd fa fa fa fd fa fa fa 06 fa
>   0x0c047fff8120: fa fa 00 fa fa fa fd fa fa fa 00 fa fa fa fd fa
> Shadow byte legend (one shadow byte represents 8 application bytes):
>   Addressable: 00
>   Partially addressable: 01 02 03 04 05 06 07
>   Heap left redzone:  fa
>   Freed heap region:  fd
>   Stack left redzone:  f1
>   Stack mid redzone:  f2
>   Stack right redzone:  f3
>   Stack after return:  f5
>   Stack use after scope:   f8
>   Global redzone:  f9
>   Global init order:  f6
>   Poisoned by user:  f7
>   Container overflow:  fc
>   Array cookie:   ac
>   Intra object redzone:    bb
>   ASan internal:  fe
>   Left alloca redzone:  ca
>   Right alloca redzone:    cb
> ==16751==ABORTING
> Failed to build miniperl. Please run make minitest
> makefile:362: recipe for target 'lib/buildcustomize.pl' failed
> make: *** [lib/buildcustomize.pl] Error 1
> 
> [Run]: AFL_USE_ASAN=1 make minitest
> [Output]: the same as above
> 
> Please fix the bug.
> Thanks,
> Manh Nguyen
> ********************************
> 
Can you supply the full ./Configure command (i.e., all switches) which you used in this attempt to build with AFL?

Thank you very much.



-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=134212

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About