SecurityTracker.com
    Home    |    View Topics    |    Search    |    Contact Us    |   

SecurityTracker
Archives


 


Category:   Application (Generic)  >   PHP Vendors:   PHP Group
(Gentoo Issues Fix) PHP Bugs in addslashes() and exif_read_data() May Let Users Bypass Input Validation Functions
SecurityTracker Alert ID:  1012621
SecurityTracker URL:  http://securitytracker.com/id/1012621
CVE Reference:   CVE-2004-1020, CVE-2004-1065   (Links to External Site)
Date:  Dec 19 2004
Impact:   Modification of system information, Modification of user information
Fix Available:  Yes  Vendor Confirmed:  Yes  
Version(s): prior to 4.3.10 and 5.0.3
Description:   Two vulnerabilities were reported in PHP. A user may be able to upload files to certain directories or bypass input validation functions.

The vendor reported that the addslashes() function does not properly escape '\0' [CVE: CVE-2004-1020].

It is also reported that there is an overflow in the exif_read_data() function that can be triggered by a long sectionname. When magic_quotes_gpc is used, a one-level directory traversal is possible with file uploads [CVE: CVE-2004-1065].

Impact:   A user may be able to upload files to certain directories.

A user may be able to bypass input validation functions.

Solution:   Gentoo has released a fix and indicatest that all PHP users should upgrade to the latest version:

# emerge --sync
# emerge --ask --oneshot --verbose ">=dev-php/php-4.3.10"

All mod_php users should upgrade to the latest version:

# emerge --sync
# emerge --ask --oneshot --verbose ">=dev-php/mod_php-4.3.10"

All php-cgi users should upgrade to the latest version:

# emerge --sync
# emerge --ask --oneshot --verbose ">=dev-php/php-cgi-4.3.10"

Vendor URL:  www.php.net/ (Links to External Site)
Cause:   Boundary error, Input validation error
Underlying OS:  Linux (Gentoo)

Message History:   This archive entry is a follow-up to the message listed below.
Dec 16 2004 PHP Bugs in addslashes() and exif_read_data() May Let Users Bypass Input Validation Functions



 Source Message Contents

Subject:  [gentoo-announce] [ GLSA 200412-14 ] PHP: Multiple vulnerabilities


This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigF127259744D06E8FA13B40B6
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Gentoo Linux Security Advisory                           GLSA 200412-14
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                            http://security.gentoo.org/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  Severity: High
     Title: PHP: Multiple vulnerabilities
      Date: December 19, 2004
      Bugs: #74547
        ID: 200412-14

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Synopsis
========

Several vulnerabilities were found and fixed in PHP, ranging from an
information leak and a safe_mode restriction bypass to a potential
remote execution of arbitrary code.

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.10                           >= 4.3.10
  2  dev-php/mod_php      < 4.3.10                           >= 4.3.10
  3  dev-php/php-cgi      < 4.3.10                           >= 4.3.10
    -------------------------------------------------------------------
     3 affected packages on all of their supported architectures.
    -------------------------------------------------------------------

Description
===========

Stefan Esser and Marcus Boerger reported several different issues in
the unserialize() function, including serious exploitable bugs in the
way it handles negative references (CAN-2004-1019).

Stefan Esser also discovered that the pack() and unpack() functions are
subject to integer overflows that can lead to a heap buffer overflow
and a heap information leak. Finally, he found that the way
multithreaded PHP handles safe_mode_exec_dir restrictions can be
bypassed, and that various path truncation issues also allow to bypass
path and safe_mode restrictions.

Ilia Alshanetsky found a stack overflow issue in the exif_read_data()
function (CAN-2004-1065). Finally, Daniel Fabian found that addslashes
and magic_quotes_gpc do not properly escape null characters and that
magic_quotes_gpc contains a bug that could lead to one level directory
traversal.

Impact
======

These issues could be exploited by a remote attacker to retrieve web
server heap information, bypass safe_mode or path restrictions and
potentially execute arbitrary code with the rights of the web server
running a PHP application.

Workaround
==========

There is no known workaround at this time.

Resolution
==========

All PHP users should upgrade to the latest version:

    # emerge --sync
    # emerge --ask --oneshot --verbose ">=dev-php/php-4.3.10"

All mod_php users should upgrade to the latest version:

    # emerge --sync
    # emerge --ask --oneshot --verbose ">=dev-php/mod_php-4.3.10"

All php-cgi users should upgrade to the latest version:

    # emerge --sync
    # emerge --ask --oneshot --verbose ">=dev-php/php-cgi-4.3.10"

References
==========

  [ 1 ] PHP 4.3.10 Release Announcement
        http://www.php.net/release_4_3_10.php
  [ 2 ] Hardened-PHP Security Advisory
        http://www.hardened-php.net/advisories/012004.txt
  [ 3 ] SEC Consult Advisory

http://www.securityfocus.com/archive/1/384663/2004-12-15/2004-12-21/0
  [ 4 ] CAN-2004-1019
        http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-1019
  [ 5 ] CAN-2004-1065
        http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-1065

Availability
============

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

  http://security.gentoo.org/glsa/glsa-200412-14.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.

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/2.0


--------------enigF127259744D06E8FA13B40B6
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBxYjvvcL1obalX08RAtCSAKCckmvGqf2hm29A7BODn1GA1EInAwCfaO51
qGHqhdqStq1aRIns4LeP9As=
=/7FC
-----END PGP SIGNATURE-----

--------------enigF127259744D06E8FA13B40B6--

 
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us

This web site uses cookies for web analytics. Learn More

Copyright 2019, SecurityGlobal.net LLC