Perl "lc ()" and "uc ()" functions TAINT mode to protect security restriction bypass vulnerabilities

Source: Internet
Author: User
Tags taint tainted

Release date:
Updated on:

Affected Systems:
Larry Wall Perl 5.13.10
Larry Wall Perl 5.12.3
Larry Wall Perl 5.12.1
Larry Wall Perl 5.12
Larry Wall Perl 5.10.1
Larry Wall Perl 5.10.1
Larry Wall Perl 5.10
RedHat Fedora 15
RedHat Fedora 14
RedHat Fedora 13
Unaffected system:
Larry Wall Perl 5.14
Description:
--------------------------------------------------------------------------------
Bugtraq id: 47124
Cve id: CVE-2011-1487

Perl is a free and powerful programming language.

Perl "lc ()" and "uc ()" functions have the TAINT mode Security Restriction Bypass Vulnerability in implementation, remote attackers can exploit this vulnerability to bypass security checks in Perl applications that rely on TAINT mode protection.

This vulnerability is caused by the change of 28011 (ec9af7d). The pp_lc function of the perl package does not use sv_setsv_flags. The following two lines are skipped:
If (SvTAINTED (sstr ))
SvTAINT (dstr );

<* Source: mmartinec

Link: http://perl5.git.perl.org/perl.git/commitdiff/539689e74a3bcb04d29e4cd9396de91a81045b99
*>

Test method:
--------------------------------------------------------------------------------

Alert

The following procedures (methods) may be offensive and are intended only for security research and teaching. Users are at your own risk!

& Gt; perl-Te 'use Scalar: Util qw (tainted); $ t = $0; $ u = lc ($ t); printf ("% d, % d \ n ", tainted ($ t), tainted ($ u ))'

& Gt; perl-Te 'use Scalar: Util qw (tainted); $ t = $0; $ u = lc ($ t); printf ("% d, % d \ n ", tainted ($ t), tainted ($ u ))'

Suggestion:
--------------------------------------------------------------------------------
Vendor patch:

Larry Wall
----------
The vendor has released a patch to fix this security problem. Please download it from the vendor's homepage:

Http://www.perl.org/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.