Subject: | Buffer overflow |
On a CentOS 7 system with the system perl (5.16.3):
...
GFUJI/XS-MagicExt-0.05.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t
# Testing XS::MagicExt/0.05
t/00_load.t .. ok
In file included from /usr/include/string.h:638:0,
from /usr/lib64/perl5/CORE/perl.h:1003,
from MGX.xs:3:
In function ‘memset’,
inlined from ‘do_test’ at MGX.xs:26:2,
inlined from ‘XS_MGX_do_test’ at MGX.c:237:9:
/usr/include/bits/string3.h:84:3: warning: call to __builtin___memset_chk will always overflow destination buffer [enabled by default]
return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
^
*** buffer overflow detected ***: /usr/bin/perl terminated
======= Backtrace: =========
/lib64/libc.so.6(__fortify_fail+0x37)[0x7f97dc72b9e7]
/lib64/libc.so.6(+0x115b62)[0x7f97dc729b62]
/home/cpansand/.cpan/build/2019030917/XS-MagicExt-0.05-oevB1o/t/test/blib/arch/auto/MGX/MGX.so(+0xc22)[0x7f97d5ae1c22]
/usr/lib64/perl5/CORE/libperl.so(Perl_pp_entersub+0x58f)[0x7f97dda2c41f]
/usr/lib64/perl5/CORE/libperl.so(Perl_runops_standard+0x16)[0x7f97dda24b96]
/usr/lib64/perl5/CORE/libperl.so(perl_run+0x355)[0x7f97dd9c1985]
/usr/bin/perl[0x400ce9]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f97dc6363d5]
/usr/bin/perl[0x400d21]
...