Bug 89975
Summary: | php session.save_path insecure | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Tom Wood <woodt> |
Component: | php | Assignee: | Joe Orton <jorton> |
Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 9 | Keywords: | Security |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | 4.3.4-5 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-01-21 17:42:28 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
Tom Wood
2003-04-30 17:48:09 UTC
The files are created with permissions 0600 though - how can this allow an attacker to retrieve session information? It looks like the files are not created with O_EXCL, which means a local attacker could possibly subvert a new session, if they can predict the session key. I'm not sure how predictable session keys are - have you researched that? My gut feel says that since these files are usually created by whatever user is running apache, that even O_EXCL isn't going to be sufficient, since you can do "ls /tmp". A rogue PHP script would do the trick on a shared server of some sort, like found with many hosting companies. Please reference http://www.webkreator.com/php/configuration/php-session-security.html for a bit more info. Ah, thanks. You can fix all this by appropriate configuration, but the defaults are not ideal, I agree. In a vhosted environment you can set a separate save_path for each vhost in httpd.conf, like: php_admin_value session.save_path /private/space/for/vhost Downgrading this from "security" severity since it's really a configuration issue. I strongly disagree with the downgrade from security status. This may appear to be just a configuration issue, but the Red Hat default configuration is vulnerable to session hijacking. This is fixed in Raw Hide for future releases, by adding /var/lib/php/session which has permissions of 0700 is owned by apache; the default php.ini now uses: session.save_path = /var/lib/php/session Thanks for the report. |