in reply to Perl 5.8.0 PerlIO insecure dependency
Here is the code in question from PerlIO....
sub import { my $class = shift; while (@_) { my $layer = shift; if (exists $alias{$layer}) { $layer = $alias{$layer} } else { $layer = "${class}::$layer"; } eval "require $layer"; # line 22 warn $@ if $@;
It would seem reasonable to add:
$layer = $1 if $layer =~ m/^([\w:]+)$/;
Just before the eval to untaint it safely. That should allow everything through that needs to come through. It is a resonable patch I would have thought. It may however just allow stuff to break elsewhere.
Does your script really need to be suid in the first place?
cheers
tachyon
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
no PerlIO $ENV{TAINTED};
by PodMaster (Abbot) on Apr 13, 2004 at 02:12 UTC | |
by tachyon (Chancellor) on Apr 13, 2004 at 02:38 UTC | |
by PodMaster (Abbot) on Apr 13, 2004 at 04:05 UTC | |
by tachyon (Chancellor) on Apr 13, 2004 at 04:17 UTC | |
by PodMaster (Abbot) on Apr 13, 2004 at 04:47 UTC | |
| |
|
Re: Re: Perl 5.8.0 PerlIO insecure dependency
by bplatz (Initiate) on Apr 13, 2004 at 01:29 UTC |