develooper Front page | perl.perl5.porters | Postings from April 2008

Re: Taint (PL_tainting, SvTAINTED_on, SvTAINTED_off, SvTAINT)

Thread Previous
From:
Paul Szabo
Date:
April 30, 2008 03:13
Subject:
Re: Taint (PL_tainting, SvTAINTED_on, SvTAINTED_off, SvTAINT)
Message ID:
200804300529.m3U5T48o016136@asti.maths.usyd.edu.au
Dear Rick et al,

>> 	PL_tainting |= (PL_uid && (PL_euid != PL_uid || PL_egid != PL_gid));
> ... the problem ... is that it turns tainting on.

When I was working with this code, I left that in place so as to be
"more secure" than previous versions: really to keep changes to a
minimum and a better likelyhood of them being accepted.

I do not think it is right to base taintedness on a comparison of UIDs:
prevents legitimate use of perl constructs from within setuid programs
(e.g. cannot do "perl -e 'stuff'" if a parent was setuid); and UID
checks do not trigger when root is running a setuid root script, so his
own test may be flawed. As commented, the UID checks should be changed
to "am now or came from suidperl"; and the perlsec page changed
accordingly.

Cheers,

Paul Szabo   psz@maths.usyd.edu.au   http://www.maths.usyd.edu.au/u/psz/
School of Mathematics and Statistics   University of Sydney    Australia

Thread Previous


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