Bug 134975 - CAN-2004-0959 PHP arbitrary file creation
CAN-2004-0959 PHP arbitrary file creation
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: php (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
: Security
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-07 12:48 EDT by Josh Bressers
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-21 13:54:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch from upstream CVS (817 bytes, patch)
2004-10-07 14:02 EDT, Josh Bressers
no flags Details | Diff

  None (edit)
Description Josh Bressers 2004-10-07 12:48:30 EDT
This issue was reported to bugtraq on 2004-09-15
http://www.securityfocus.com/archive/1/375370

Bad array parsing in the rfc1867.c file could lead to the overwriting
of the $_FILES array, which in turn could allow an attacker to write
arbitrary files with the permission of the user running apache.

This issue also affects RHEL2.1
Comment 1 Josh Bressers 2004-10-07 14:02:37 EDT
Created attachment 104908 [details]
Patch from upstream CVS
Comment 2 Joe Orton 2004-10-11 10:30:38 EDT
OK.  This is a (somewhat) subtle trick to bypass the sanity checking
of the filename used for the uploaded file.

But the code to do sanity checking of the filename was itself not
added until after 4.3.2, so in fact no clever tricks are needed at all
for this version.
Comment 3 Mark J. Cox (Product Security) 2004-12-21 13:54:54 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2004-687.html

Note You need to log in before you can comment on or make changes to this bug.