perl5225cdelta - what is new for cperl v5.22.5


This document describes perl-only differences between the cperl 5.22.4 release and the cperl 5.22.5 release.

For cperl also see Changes and perlcperl


@{ \327 \n } buffer overflows

Fixed @{ \327 \n } tokenizer failures and heap buffer overflows in sv_vcatpvfn_flags() with wrong tracking of PL_linestr, the currently parsed line buffer. This can easily lead to security relevant exploits.

[perl #128951]

eval "q" . chr(overlarge) stack overflow

In eval "q" . chr(100000000064) generating the error message Can't find string terminator "XXX"' was overrunning a local buffer designed to hold a single utf8 char, since it wasn't allowing for the \0 at the end.

[perl #128952]

Set umask(0600) before calling mkstemp

POSIX 2008 demands such an umask, but it is still problematic on Solaris, HP-UX and AIX and older libcs, e.g. glibc <= 2.06. The old umask 0177 was insecure.

Disallow illegal glob with embedded NUL

E.g. <$fh\000> throws now the safe syscalls warning, and errors with Glob not terminated, and does not pass the illegal glob path to the internal or external glob.

See [cperl #342]

Follow chroot with chdir("/")

Fixed two security issues with the chroot op:

* fail on embedded NUL in the chroot argument. Set errno to EINVAL.

* If a call to chroot is not followed by a call to chdir("/") the chroot jail confinement can be violated. In Perl_pp_chroot: A call to chroot followed by an operation that may escape from the chroot jail. Coverity CID #165302 Insecure chroot.

Modules and Pragmata

Updated Modules and Pragmata

Archive::Tar 2.26

'0' is a valid name for an archive, change 'iter' to check definedness. See

B::C 1.55_06

Better CopFILE_set, Fixup arenasize refcnt. Delay cvref to init2, properly set a SvRV to a XS sub. Optimize constpv for CvFILE (less constants to merge for gcc). Improve NV precision by one digit. Fix to compile in, abstract and set %INC. Fix generation of @B::C::Config::deps on Windows. Fix !C99 precedence bug (e.g. MSVC). Minor refactor to simplify save_hek. Use the new get_svs, get_avs, get_hvs macros.

B::Debug 1.26
bignum 0.47
Config 6.23

U32_MAX keys on 64bit. Better gperf and C++ support. Add --regen.

CPAN 2.18_01

Update from upstream 2.16, plus keep our cperl and secure YAML:::XS support.

CPAN::Meta 2.150010c

Merged with Parse::CPAN::Meta, cpan/Parse-CPAN-Meta is gone.

Cpanel::JSON::XS 3.0240

Update from upstream

experimental 0.019_01c
ExtUtils::MM_Unix 8.04_04

Support filehandles for MM->parse_version.

ExtUtils::Liblist::Kid 8.04_06

Silence No library found errors on darwin for libSystem.dylib libs.

HTTP::Tiny 0.070
IO 1.38

from latest cperl.

IO::Socket::IP 0.39
JSON::PP 2.97000_04

Merge 2.97000 from cpan with ours.

Math::BigInt 1.999811
Math::BigRat 0.2613
Module::CoreList 5.20180101c

backported from latest cperl, TieHashDelta is now unused.

parent 0.236

Without ' as pkg separator.

Perl::OSType 1.010

Added msys

podlators 4.09

Added all the man tests from upstream

Pod::Perldoc 3.2801
Pod::Simple 3.35
Pod::Usage 1.69
Scalar::Util 1.49_10
SelfLoader 1.24
SelectSaver 1.02_01

3-arg open

Socket 2.024_02

Merge cpan 2.024 with our 2.021_02, plus fix some problems in their new code.

Sys::Syslog 0.35
Term::ANSIColor 4.06
Term::ReadKey 2.37_03

from cperl 5.27.3c

Test::Harness 3.39

Fix and re-enable t/regression.t

Thread::Queue 3.12
Thread::Semaphore 2.13
threads 2.18_01
threads::shared 1.57
Time::HiRes 1.9747_01

More Darwin thread fixes for clock_gettime, Sierra support, test improvements.

Time::Local 1.25

Less runtime memory: demand-load Carp, Config

Time::Piece 1.3203
Unicode::Collate 1.25
version 0.9918_02c

With the LYON concensus, affecting some tests with alpha versions. e.g. v1.1_0 does not warn anymore.

YAML::LibYAML 0.75

Utility Changes



Internal Changes

Changes which affect the interface available to XS code go here. Other significant internal changes for future core maintainers should be noted as well.

Selected Bug Fixes

aelem_u: fix loop oob for padav

Out-of-bounds check elimination in loops has been fixed for lexical counters. E.g. with my @a=(0..4); for my $i (0..$#a) { $a[$i] } each access to $a[$i] in the loop is now really converted to the unchecked faster aelem_u op.

Note that multideref ops are not yet converted to omit out-of-bounds checks. This is only implemented since cperl-5.25, since it needs to widen the internal mderef structure.

fixed -DH crash on clear

When clearing a hv (with refcnt 0), HvKEYS crashed with an invalid mg on a placeholder. Just use HvTOTALKEYS instead.

Check for null in pp_ghostent et al.

Specifically in the S_space_join_names_mortal static function that several pp functions call. On some platforms (such as Gentoo Linux with torsocks), hent->h_aliases (where hent is a struct hostent *) may be null after a gethostent call.

[perl #128740]


Fixed return type of DynaLoader::dl_find_symbol_anywhere(), the address, not the name. [cperl #352].


cperl 5.22.5 represents approximately 17 months of development since cperl 5.22.4c and contains approximately 140,000 lines of changes across 880 files from 3 authors.

Excluding auto-generated files, documentation and release tools, there were approximately 54,000 lines of changes to 600 .pm, .t, .c and .h files.

The following people are known to have contributed the improvements that became cperl 5.22.5:

Reini Urban, Slaven Rezic, Father Chrysostomos.

The list above is almost certainly incomplete as it is automatically generated from version control history including the perl and cperl repos. In particular, it does not include the names of the (very much appreciated) contributors who reported issues to the Perl bug tracker and the cperl github issues.

Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish.

For a more complete list of all of Perl's historical contributors, please see the AUTHORS file in the Perl source distribution.

Generated with:

    cperl Porting/ cperl-5.22.4..HEAD -c

Reporting Bugs

If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.misc newsgroup and the perl bug database at . There may also be information at , the Perl Home Page.

If you believe you have an unreported bug, please run the perlbug program included with your release. Be sure to trim your bug down to a tiny but sufficient test case. Your bug report, along with the output of perl -V, will be sent off to to be analysed by the Perl porting team.

If you think it's a cperl specific bug or trust the cperl developers more please file an issue at

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to This points to a closed subscription unarchived mailing list, which includes all the core committers, who will be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

If you trust the cperl developers more, please send an email to them. The p5p security teams skips many security issues, or are unwilling to fix them.


The Changes file for an explanation of how to view exhaustive details on what changed.

The INSTALL file for how to build Perl.

The README file for general stuff.

The Artistic and Copying files for copyright information.