Bug 134975 - CAN-2004-0959 PHP arbitrary file creation
Summary: CAN-2004-0959 PHP arbitrary file creation
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: php   
(Show other bugs)
Version: 3.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Joe Orton
QA Contact: David Lawrence
Keywords: Security
Depends On:
TreeView+ depends on / blocked
Reported: 2004-10-07 16:48 UTC by Josh Bressers
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-21 18:54:54 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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 18:02 UTC, Josh Bressers
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2004:687 high SHIPPED_LIVE Important: php security update 2004-12-21 05:00:00 UTC

Description Josh Bressers 2004-10-07 16:48:30 UTC
This issue was reported to bugtraq on 2004-09-15

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 18:02:37 UTC
Created attachment 104908 [details]
Patch from upstream CVS

Comment 2 Joe Orton 2004-10-11 14:30:38 UTC
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 2004-12-21 18:54:54 UTC
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.


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