summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2013-08-26 11:26:19 +1000
committerTony Cook <tony@develop-help.com>2013-08-26 14:06:16 +1000
commitc8028aa68dedb3c7683abb0bcf0fdba782a1190e (patch)
tree0c1acb4263f2d3d1b08e2e42d1ad18b2686617d8 /regen
parent5f7c1602dfa694a4a6761e9e4fc077ce794f7ff0 (diff)
downloadperl-c8028aa68dedb3c7683abb0bcf0fdba782a1190e.tar.gz
[perl #117265] safesyscalls: check embedded nul in syscall args
Check for the nul char in pathnames and string arguments to syscalls, return undef and set errno to ENOENT. Added to the io warnings category syscalls. Strings with embedded \0 chars were prev. ignored in the syscall but kept in perl. The hidden payloads in these invalid string args may cause unnoticed security problems, as they are hard to detect, ignored by the syscalls but kept around in perl PVs. Allow an ending \0 though, as several modules add a \0 to such strings without adjusting the length. This is based on a change originally by Reini Urban, but pretty much all of the code has been replaced.
Diffstat (limited to 'regen')
-rw-r--r--regen/warnings.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/regen/warnings.pl b/regen/warnings.pl
index 72d9a0b410..a3e2b44dfe 100644
--- a/regen/warnings.pl
+++ b/regen/warnings.pl
@@ -19,7 +19,7 @@
#
# This script is normally invoked from regen.pl.
-$VERSION = '1.02_03';
+$VERSION = '1.02_05';
BEGIN {
require 'regen/regen_lib.pl';
@@ -40,6 +40,7 @@ my $tree = {
'newline' => [ 5.008, DEFAULT_OFF],
'exec' => [ 5.008, DEFAULT_OFF],
'layer' => [ 5.008, DEFAULT_OFF],
+ 'syscalls' => [ 5.019, DEFAULT_OFF],
}],
'syntax' => [ 5.008, {
'ambiguous' => [ 5.008, DEFAULT_OFF],
@@ -59,7 +60,7 @@ my $tree = {
'internal' => [ 5.008, DEFAULT_OFF],
'debugging' => [ 5.008, DEFAULT_ON],
'malloc' => [ 5.008, DEFAULT_ON],
- }],
+ }],
'deprecated' => [ 5.008, DEFAULT_ON],
'void' => [ 5.008, DEFAULT_OFF],
'recursion' => [ 5.008, DEFAULT_OFF],
@@ -465,7 +466,7 @@ close_and_rename($lexwarn);
__END__
package warnings;
-our $VERSION = '1.18';
+our $VERSION = '1.19';
# Verify that we're called correctly so that warnings will work.
# see also strict.pm.