Bug 538854 - open_basedir appears to be getting trashed
Summary: open_basedir appears to be getting trashed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: php
Version: 12
Hardware: i686
OS: Linux
low
high
Target Milestone: ---
Assignee: Joe Orton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-19 15:14 UTC by K H
Modified: 2010-11-28 15:40 UTC (History)
3 users (show)

Fixed In Version: php-5.3.1-1.fc12
Clone Of:
Environment:
Last Closed: 2010-11-28 15:40:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
PHP Bug Tracker 48880 0 None None None Never

Description K H 2009-11-19 15:14:12 UTC
Description of problem:

I updated F11 to F12.  I use squirrelmail for email and notice that after some random number of requests, I start getting errors like this from squirrelmail and other php pages:

Warning: require_once(): open_basedir restriction in effect. File(/usr/share/squirrelmail/include/validate.php) is not within the allowed path(s): (imapConnection) in /usr/share/squirrelmail/src/left_main.php on line 25

Warning: require_once(/usr/share/squirrelmail/include/validate.php): failed to open stream: Operation not permitted in /usr/share/squirrelmail/src/left_main.php on line 25

Fatal error: require_once(): Failed opening required '../include/validate.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/share/squirrelmail/src/left_main.php on line 25

the '(imapConnection)' is the contents of the variable open_basedir and the value changes,  It generally seems to the name of a php variable in whatever page is being loaded but it is sometimes trashed.

I have tried working around this by setting open_basedir in php.ini and <Directory> entries in httpd conf files with no luck.  I tried to compile php 5.2.9 on F12 for testing purposes but it failed.

If I restart httpd, everything works fine for a while before open_basedir appears to be trashed again. Usually 10-20 page loads and its messed up again but it does vary. 

Version-Release number of selected component (if applicable):
5.3.0

How reproducible:
Very reproducible

Steps to Reproduce:
1. service httpd restart
2. log in to squirrelmail
3. keep reloading squirrelmail until it fails or just navigate around emails.
  
Actual results:

Warning: require_once(): open_basedir restriction in effect. File(/usr/share/squirrelmail/include/validate.php) is not within the allowed path(s): (imapConnection) in /usr/share/squirrelmail/src/left_main.php on line 25

Warning: require_once(/usr/share/squirrelmail/include/validate.php): failed to open stream: Operation not permitted in /usr/share/squirrelmail/src/left_main.php on line 25

Fatal error: require_once(): Failed opening required '../include/validate.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/share/squirrelmail/src/left_main.php on line 25

Expected results:
It should run without the warnings/errors

Additional info:

Comment 1 Tim Jackson 2009-11-20 23:37:19 UTC
I'm seeing this in a custom webapp too, so I don't think it's anything to do with squirrelmail. Although it does vary between requests (some work OK), it's highly reproducible for me even after an Apache restart. It seems to be the first few bytes of the open_basedir path that are getting stomped on in my case:

Warning: Unknown: open_basedir restriction in effect. File(/path/to/something/file.php) is not within the allowed path(s): (('�h/to/something) in Unknown on line 0

I'm running as mod_php under Apache, with the following related packages installed:

php-5.3.0-7.fc12.i686
php-xml-5.3.0-7.fc12.i686
php-gd-5.3.0-7.fc12.i686
php-common-5.3.0-7.fc12.i686
php-cli-5.3.0-7.fc12.i686
php-mysql-5.3.0-7.fc12.i686
php-mbstring-5.3.0-7.fc12.i686
php-mcrypt-5.3.0-7.fc12.i686
php-imap-5.3.0-7.fc12.i686

Comment 2 K H 2009-11-21 01:53:31 UTC
I didn't mean to imply that it was something squirrelmail is doing.  I just picked that is its a php package that comes with Fedora and hopefully reproduceable for the supporters.  This bug happens in all my php apps including drupal 5.x, drupal 6.x, and some custom sites.

Comment 3 Remi Collet 2009-11-21 07:00:15 UTC
Please try the php 5.3.1 available in updates-testing.

+

Comment 4 Tim Jackson 2009-11-21 14:58:52 UTC
Yep, fixed in 5.3.1-1.fc12

Comment 5 Bug Zapper 2010-11-04 06:03:29 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


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