From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 27 Jun 2005 13:53:46 +0400 From: Alexey Tourbin To: Sisyphus Message-ID: <20050627095346.GK31585@solemn.turbinal.org> Mail-Followup-To: Sisyphus References: <20050626090644.GB31585@solemn.turbinal.org> <20050627074852.GI31585@solemn.turbinal.org> <20050627075703.GJ31585@solemn.turbinal.org> <200506271303.25973.serpiph@nikiet.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1ppIqr1kl39GnwQx" Content-Disposition: inline In-Reply-To: <200506271303.25973.serpiph@nikiet.ru> Subject: [sisyphus] Re: Q: perl security, CPAN security X-BeenThere: sisyphus@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Linux Sisyphus discussion list List-Id: ALT Linux Sisyphus discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2005 09:54:41 -0000 Archived-At: List-Archive: --1ppIqr1kl39GnwQx Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 27, 2005 at 01:03:25PM +0400, Epiphanov Sergei wrote: > =F7 =D3=CF=CF=C2=DD=C5=CE=C9=C9 =CF=D4 27 =E9=C0=CE=D8 2005 11:57 Alexey = Tourbin =CE=C1=D0=C9=D3=C1=CC: > > > =F3=C5=CA=DE=C1=D3 =D0=D2=C1=D7=C9=CC=CF =C4=CC=D1 =C9=CD=D0=CC=C9=C3= =C9=D4=CE=CF=C7=CF =D7=CB=CC=C0=DE=C5=CE=C9=D1 tain mode =D7=D9=C7=CC=D1=C4= =C9=D4 =D4=C1=CB: > > > perl.c: =9A =9APL_tainting |=3D (PL_uid && (PL_euid !=3D PL_uid || PL= _egid !=3D > > > PL_gid)); > > > > > > =F0=D2=C5=C4=CC=C1=C7=C1=C5=D4=D3=D1 =C4=CF=C2=C1=D7=C9=D4=D8 =D7 =D5= =D3=CC=CF=D7=C9=C5 PL_euid=3D=3D0 || ... > > > > =FA=C1=C2=D9=CC =D3=CB=C1=DA=C1=D4=D8, =DE=D4=CF =C2=D5=C4=C5=D4 =D4=C1= =CB=CF=CA =D6=C5 workaround, =CB=C1=CB=CF=CA =D3=C5=CA=DE=C1=D3 =D3=D5=DD= =C5=D3=D4=D7=D5=C5=D4. > =E8=CD, =D3=C5=CA=DE=C1=D3 =D1 =CD=CF=C7=D5 =D7=D9=C2=D2=C1=D4=D8, =D7=CB= =CC=C0=DE=C1=D4=D8 =C9=CC=C9 =CE=C5=D4 =DC=D4=CF=D4 =D2=C5=D6=C9=CD. =F7 = =F7=C1=DB=C5=CD =D3=CC=D5=DE=C1=C5=20 > =D7=CF=CC=C5=CA-=CE=C5=D7=CF=CC=C5=CA =D0=D2=C9=C4=A3=D4=D3=D1 =CC=CF=CD= =C1=D4=D8 =C7=CF=CC=CF=D7=D5 =CE=C1=C4 =CB=C1=D6=C4=CF=CA =C9=CE=D3=D4=D2= =D5=CB=C3=C9=C5=CA. =ED=CF=D6=CE=CF =DA=C1=D0=D5=D3=D4=C9=D4=D8 =D3 =CF=D0=C3=C9=C5=CA -t (enab= le tainting warnings), =CF=CE=C1 "=D0=C5=D2=C5=C2=C9=D7=C1=C5=D4" =CF=D0=C3=C9=C0 -T (enable tainting checks). =EF=C2 =DC=D4=CF=CD =CC=D5=DE= =DB=C5 =CE=C9=CB=CF=CD=D5 =CE=C5 =C7=CF=D7=CF=D2=C9=D4=D8. :) > =EE=C1=D0=D2=C9=CD=C5=D2, =D2=C1=C2=CF=DE=C9=CA =D3=CB=D2=C9=D0=D4 =D7=C9= =C4=C1: >=20 > #!/usr/bin/perl > foreach $l(@ARGV){ > system("/usr/bin/=CB=CF=CD=C1=CE=C4=C1 '$l'"); > } =F2=C1=C2=CF=DE=C9=CA? =F4=CF =C5=D3=D4=D8 =CF=CE =C2=C5=D2=A3=D4 =D0=D2= =CF=C9=DA=D7=CF=CC=D8=CE=D9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=CF=D4=D8=20 > =CB=C1=CB-=D4=CF =DA=C1=C4=C5=CA=D3=D4=D7=D5=C0 =D7 =D5=D0=D2=C1=D7=CC=C5= =CE=C9=C9 =D3=C5=D2=D7=C5=D2=CF=CD, =D1 =CF=C2=D1=DA=C1=D4=C5=CC=D8=CE=CF = =D0=C9=DB=D5 =D0=C1=D2=C1=CD=C5=D4=D2 -T. =F7=D9,=20 > =CB=CF=C7=C4=C1 =D0=C9=DB=C9=D4=C5 '/bin/cat "file"', =CE=C5 =D0=D2=CF=D7= =C5=D2=D1=C5=D4=C5 file =CE=C1 "=D7=DB=C9=D7=CF=D3=D4=D8". =E8=CF=D4=D1=20 > =DA=CE=C1=C5=D4=C5, =DE=D4=CF =CE=C5=D4=C5=CB=D3=D4=CF=D7=D9=CA =C6=C1=CA= =CC =CD=CF=D6=C5=D4 =D0=D2=C9=D7=C5=D3=D4=C9 =CB =D3=C2=CF=C0 =DB=D2=C9=C6= =D4=CF=D7 =CB=CF=CE=D3=CF=CC=C9. =F4=C1=CB =D6=C5 =C9=20 > =D1 =D0=C9=DB=D5 =CE=C1 Perl. =EF=C8, =D1 =CE=C5 =C9=D3=D0=CF=CC=D8=DA=D5=C0 /bin/cat, =D1 =C9=D3=D0=CF= =CC=D8=DA=D5=C0=20 $ perl -MConfig -le 'print $Config{pager}' /usr/bin/less -isR $ --1ppIqr1kl39GnwQx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFCv8yqfBKgtDjnu0YRAginAJ4w2BkcWyV2aZ2DrsG+gvBceHpdnwCeJAtY UivwKK9TFBX5RptfmOxlEMs= =XA96 -----END PGP SIGNATURE----- --1ppIqr1kl39GnwQx--