Gentoo Linux Advisory: PHP | Linux Today

Gentoo Linux Advisory: PHP

Written By
Web Webster
Web Webster
Jul 15, 2004

Gentoo Linux Security Advisory GLSA 200407-13


http://security.gentoo.org/


Severity: High
Title: PHP: Multiple security vulnerabilities
Date: July 15, 2004
Bugs: #56985
ID: 200407-13


Synopsis

Multiple security vulnerabilities, potentially allowing remote
code execution, were found and fixed in PHP.

Background

PHP is a general-purpose scripting language widely used to
develop web-based applications. It can run inside a web server
using the mod_php module or the CGI version of PHP, or can run
stand-alone in a CLI.

Affected packages

Package Vulnerable Unaffected
1 dev-php/php <= 4.3.7-r1 >= 4.3.8
2 dev-php/mod_php <= 4.3.7-r1 >= 4.3.8
3 dev-php/php-cgi <= 4.3.7-r1 >= 4.3.8

3 affected packages on all of their supported architectures.

Description

Several security vulnerabilities were found and fixed in version
4.3.8 of PHP. The strip_tags() function, used to sanitize user
input, could in certain cases allow tags containing characters
(CAN-2004-0595). When memory_limit is used, PHP might unsafely
interrupt other functions (CAN-2004-0594). The ftok and itpc
functions were missing safe_mode checks. It was possible to bypass
open_basedir restrictions using MySQL’s LOAD DATA LOCAL function.
Furthermore, the IMAP extension was incorrectly allocating memory
and alloca() calls were replaced with emalloc() for better stack
protection.

Advertisement

Impact

Successfully exploited, the memory_limit problem could allow
remote excution of arbitrary code. By exploiting the strip_tags
vulnerability, it is possible to pass HTML code that would be
considered as valid tags by the Microsoft Internet Explorer and
Safari browsers. Using ftok, itpc or MySQL’s LOAD DATA LOCAL, it is
possible to bypass PHP configuration restrictions.

Workaround

There is no known workaround that would solve all these
problems. All users are encouraged to upgrade to the latest
available versions.

Resolution

All PHP, mod_php and php-cgi users should upgrade to the latest
stable version:

    # emerge sync
    # emerge -pv ">=dev-php/php-4.3.8"
    # emerge ">=dev-php/php-4.3.8"
    # emerge -pv ">=dev-php/mod_php-4.3.8"
    # emerge ">=dev-php/mod_php-4.3.8"
    # emerge -pv ">=dev-php/php-cgi-4.3.8"
    # emerge ">=dev-php/php-cgi-4.3.8"

References

[ 1 ] CAN-2004-0594

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0594

[ 2 ] CAN-2004-0595

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0595

[ 3 ] E-Matters Advisory 11/2004

http://security.e-matters.de/advisories/112004.html

[ 4 ] E-Matters Advisory 12/2004

http://security.e-matters.de/advisories/122004.html

Availability

This GLSA and any updates to it are available for viewing at the
Gentoo Security Website:

http://security.gentoo.org/glsa/glsa-200407-13.xml

Concerns?

Security is a primary focus of Gentoo Linux and ensuring the
confidentiality and security of our users machines is of utmost
importance to us. Any security concerns should be addressed to
security@gentoo.org or
alternatively, you may file a bug at http://bugs.gentoo.org.

Advertisement

License

Copyright 2004 Gentoo Foundation, Inc; referenced text belongs
to its owner(s).

The contents of this document are licensed under the Creative
Commons – Attribution / Share Alike license.

http://creativecommons.org/licenses/by-sa/1.0

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.