Bug 103079
Summary: | Included files do not respect safe mode directive | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Antonio Galea <ant9000> |
Component: | php | Assignee: | Joe Orton <jorton> |
Status: | CLOSED NOTABUG | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.2 | CC: | ant9000 |
Target Milestone: | --- | Keywords: | Security |
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2003-08-27 11:04:46 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Antonio Galea
2003-08-26 14:25:30 UTC
A further test shows that this bug only applies to absolute path includes. That is, <? include "../../../etc/passwd"; ?> fails as it should, while <? include "/etc/passwd"; ?> includes the file. The problem certainly lies in function "php_fopen_with_path", inside "main/fopen_wrappers.c"; as soon as I have time, will try and track it down more closely. Forgive me for the fuss I've made... no bug in PHP, simply my /etc/php.ini which had the line safe_mode_include_dir = /usr/share/pear: with the ending colon... this caused every path to match. |