php5 5.3.2-1ubuntu4.13 introduced regression in magic_quotes_gpc
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| php5 (Ubuntu) |
High
|
Unassigned | ||
| Lucid |
High
|
Steve Beattie |
Bug Description
Since last lucid security update, upgrading from 5.3.2-1ubuntu4.11 to php5 5.3.2-1ubuntu4.13 introduced a regression in ini_get(
Even if magic_quotes are deprecated, this break codes relaying on detection of this ini.
We can see clearly this problem :
grep ^magic_quotes_gpc /etc/php5/
magic_quotes_gpc = On
php -v
PHP 5.3.2-1ubuntu4.13 with Suhosin-Patch (cli) (built: Feb 9 2012 06:36:10)
php -r 'var_dump(
string(1) "0"
php -v
PHP 5.3.2-1ubuntu4.11 with Suhosin-Patch (cli) (built: Dec 13 2011 18:49:27)
php -r 'var_dump(
string(1) "1"
Maverick's php5 packages have the same behaviour :
php -v
PHP 5.3.3-1ubuntu9.9 with Suhosin-Patch (cli) (built: Feb 9 2012 06:37:37)
php -r 'var_dump(
string(1) "0"
Thanks for your help
Ondřej Surý (ondrej) wrote : | #2 |
Forwarded to https:/
(Fortunatelly it's the Ubuntu today which needs to bite the bullet, since I haven't uploaded Debian security update yet. ;)
I am building Debian package with updated patch and will report back. Thanks for the test script.
Jean-Baptiste Lallement (jibel) wrote : | #3 |
Thanks for your report. I confirm the change of behavior. This was probably introduced in this change:
php5 (5.3.2-1ubuntu4.13) lucid-security; urgency=low
[...]
* SECURITY UPDATE: magic_quotes_gpc remote disable vulnerability
- debian/
magic_
- CVE-2012-0831
Changed in php5 (Ubuntu): | |
importance: | Undecided → High |
status: | Confirmed → Triaged |
tags: | added: lucid regression-update |
Changed in php5 (Ubuntu Lucid): | |
status: | New → Triaged |
importance: | Undecided → High |
summary: |
- php5 5.3.2-1ubuntu4.13 introduced regression + php5 5.3.2-1ubuntu4.13 introduced regression in magic_quotes_gpc |
Changed in php5 (Ubuntu Lucid): | |
assignee: | nobody → Canonical Security Team (canonical-security) |
Ondřej Surý (ondrej) wrote : | #4 |
The patch attached to PHP bug report fixes your problem:
root@howl:/tmp# /tmp/buildd/
string(1) "1"
root@howl:/tmp# grep ^magic_quotes_gpc /tmp/php.ini
magic_quotes_gpc = On
root@howl:/tmp# /tmp/buildd/
string(1) "1"
root@howl:/tmp# emacs php.ini
root@howl:/tmp# grep ^magic_quotes_gpc /tmp/php.ini
magic_quotes_gpc = Off
root@howl:/tmp# /tmp/buildd/
string(0) ""
Steve Beattie (sbeattie) wrote : | #5 |
Ondřej, thanks for diagnosing this issue! I'll review and incorporate your patch and release a regression fix for this shortly after testing locally.
Thanks and my apologies for introducing this regression.
Changed in php5 (Ubuntu Lucid): | |
status: | Triaged → In Progress |
assignee: | Canonical Security Team (canonical-security) → Steve Beattie (sbeattie) |
Martin Klerx (mklerx) wrote : | #6 |
The PHP-version in Hardy Heron (8.04) also has the same behaviour. (version 5.2.4-2ubuntu5.22) This broke some of the websites hosted on my severs that relied on magic_quotes_gpc detection with ini_get(
Ondřej Surý (ondrej) wrote : | #7 |
Well, it affects all versions which got that security report (i.e. all supported).
As far as I understand this bug, the magic_quotes are actually set to the correct value, it's just the ini_get() which reports wrong value.
Launchpad Janitor (janitor) wrote : | #8 |
This bug was fixed in the package php5 - 5.3.2-1ubuntu4.14
---------------
php5 (5.3.2-1ubuntu4.14) lucid-security; urgency=low
* debian/
magic_
CVE-2012-0831. Thanks to Ondřej Surý for the patch. (LP: #930115)
-- Steve Beattie <email address hidden> Fri, 10 Feb 2012 15:07:08 -0800
Changed in php5 (Ubuntu Lucid): | |
status: | In Progress → Fix Released |
Launchpad Janitor (janitor) wrote : | #9 |
This bug was fixed in the package php5 - 5.2.4-2ubuntu5.23
---------------
php5 (5.2.4-2ubuntu5.23) hardy-security; urgency=low
* debian/
magic_
CVE-2012-0831. Thanks to Ondřej Surý for the patch. (LP: #930115)
-- Steve Beattie <email address hidden> Fri, 10 Feb 2012 15:34:36 -0800
Changed in php5 (Ubuntu): | |
status: | Triaged → Fix Released |
Steve Beattie (sbeattie) wrote : | #10 |
Yes, as Ondřej said, all supported releases were affected and the issue was that ini_get(
Fixes for all releases have gone out as http://
Kousuke Ebihara (co3k) wrote : | #11 |
I've posted in php-internals list about this topic: http://
Please tell me answers to some questions.
Status changed to 'Confirmed' because the bug affects multiple users.