[SRU] stack smashing detected when calling xmlrpc_set_type
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| php |
Unknown
|
Unknown
|
||
| php5 (Ubuntu) |
Undecided
|
Chuck Short | ||
| Hardy |
Undecided
|
Unassigned | ||
| Intrepid |
Undecided
|
Marc Deslauriers | ||
| Jaunty |
Undecided
|
Marc Deslauriers |
Bug Description
Binary package hint: php5-xmlrpc
$ lsb_release -rd
Description: Ubuntu 8.04
Release: 8.04
php5-xmlrpc:
Installed: 5.2.4-2ubuntu5.1
Candidate: 5.2.4-2ubuntu5.1
Version table:
*** 5.2.4-2ubuntu5.1 0
500 http://
100 /var/lib/
5.2.4-2ubuntu5 0
500 http://
The following script reproduces:
<?php
$params = array(new DateTime());
$params[0] = $params[
?>
$ php xmlrpc_datetime.php
*** stack smashing detected ***: php terminated
======= Backtrace: =========
/lib/tls/
/lib/tls/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
php[0x82f35eb]
php(execute+
php(zend_
php(php_
php(main+
/lib/tls/
php[0x8097ec1]
======= Memory map: ========
08048000-0855e000 r-xp 00000000 08:04 323708 /usr/bin/php5
0855e000-08594000 rw-p 00516000 08:04 323708 /usr/bin/php5
08594000-08732000 rw-p 08594000 00:00 0 [heap]
b7178000-b717c000 r-xp 00000000 08:04 2997 /lib/tls/
b717c000-b717e000 rw-p 00003000 08:04 2997 /lib/tls/
b717e000-b7187000 r-xp 00000000 08:04 2994 /lib/tls/
b7187000-b7189000 rw-p 00008000 08:04 2994 /lib/tls/
b7189000-b71bc000 r-xp 00000000 08:04 40256 /usr/lib/
b71bc000-b71bd000 rw-p 00033000 08:04 40256 /usr/lib/
b71bd000-b71cd000 r-xp 00000000 08:04 27924 /usr/lib/
b71cd000-b71ce000 rw-p 0000f000 08:04 27924 /usr/lib/
b71e6000-b71ec000 r-xp 00000000 08:04 323704 /usr/lib/
b71ec000-b71ed000 rw-p 00005000 08:04 323704 /usr/lib/
b71ed000-b71ff000 r-xp 00000000 08:04 323720 /usr/lib/
b71ff000-b7200000 rw-p 00012000 08:04 323720 /usr/lib/
b7200000-b721e000 r-xp 00000000 08:04 32549 /usr/lib/
b721e000-b721f000 rw-p 0001e000 08:04 32549 /usr/lib/
b721f000-b7236000 r-xp 00000000 08:04 323735 /usr/lib/
b7236000-b7237000 rw-p 00017000 08:04 323735 /usr/lib/
b7237000-b724e000 r-xp 00000000 08:04 323746 /usr/lib/
b724e000-b7250000 rw-p 00016000 08:04 323746 /usr/lib/
b7250000-b73ec000 r-xp 00000000 08:04 90534 /usr/lib/
b73ec000-b742f000 rw-p 0019b000 08:04 90534 /usr/lib/
b742f000-b7430000 rw-p b742f000 00:00 0
b7433000-b7446000 r-xp 00000000 08:04 323769 /usr/lib/
b7446000-b7448000 rw-p 00012000 08:04 323769 /usr/lib/
b7448000-b7493000 r-xp 00000000 08:04 3077 /lib/libgcrypt.
b7493000-b7495000 rw-p 0004a000 08:04 3077 /lib/libgcrypt.
b7495000-b74a4000 r-xp 00000000 08:04 39957 /usr/lib/
b74a4000-b74a5000 rw-p 0000e000 08:04 39957 /usr/lib/
b74a5000-b7516000 r-xp 00000000 08:04 627694 /usr/lib/
b7516000-b751b000 rw-p 00071000 08:04 627694 /usr/lib/
b751b000-b7531000 r-xp 00000000 08:04 30923 /usr/lib/
b7531000-b7532000 rw-p 00015000 08:04 30923 /usr/lib/
b7532000-b753e000 r-xp 00000000 08:04 358399 /usr/lib/
b753e000-b753f000 rw-p 0000b000 08:04 358399 /usr/lib/
b753f000-b757b000 r-xp 00000000 08:04 358400 /usr/lib/
b757b000-b757d000 rw-p 0003b000 08:04 358400 /usr/lib/
b757d000-b757e000 rw-p b757d000 00:00 0
b757e000-b75ae000 r-xp 00000000 08:04 41008 /usr/lib/
b75ae000-b75af000 rw-p 0002f000 08:04 41008 /usr/lib/
b75af000-b75ea000 r-xp 00000000 08:04 41074 /usr/lib/
b75ea000-b75eb000 rw-p 0003b000 08:04 41074 /usr/lib/
b75f0000-b75f6000 r-xp 00000000 08:04 323736 /usr/lib/
b75f6000-b75f7000 rw-p 00005000 08:04 323736 /usr/lib/
b75f7000-b7602000 r-xp 00000000 08:04 323745 /usr/lib/
b7602000-b7603000 rw-p 0000a000 08:04 323745 /usr/lib/
b7603000-b7628000 r-xp 00000000 08:04 39913 /usr/lib/
b7628000-b762a000 rw-p 00025000 08:04 39913 /usr/lib/
b762a000-b7630000 rw-p b762a000 00:00 0
b7633000-b7639000 r-xp 00000000 08:04 323747 /usr/lib/
b7639000-b763a000 rw-p 00005000 08:04 323747 /usr/lib/
b763a000-b7647000 r-xp 00000000 08:04 323754 /usr/lib/
b7647000-b7648000 rw-p 0000d000 08:04 323754 /usr/lib/
b7648000-b7651000 r-xp 00000000 08:04 91233 /lib/libpam.
b7651000-b7652000 rw-p 00008000 08:04 91233 /lib/libpam.
b7652000-b7755000 r-xp 00000000 08:04 32594 /usr/lib/
b7755000-b775c000 rw-p 00102000 08:04 32594 /usr/lib/
b775c000-b775d000 rw-p b775c000 00:00 0
b775d000-b7773000 r-xp 00000000 08:04 29854 /usr/lib/
b7773000-b7774000 rw-p 00016000 08:04 29854 /usr/lib/
b7774000-b777b000 r--s 00000000 08:04 31126 /usr/lib/
b777b000-b77ba000 r--p 00000000 08:04 35546 /usr/lib/
b77d5000-b77df000 r-xp 00000000 08:04 3693 /lib/libgcc_s.so.1
b77df000-b77e0000 rw-p 0000a000 08:04 3693 /lib/libgcc_s.so.1
b77f8000-b77fa000 rw-p b77f8000 00:00 0
bAborted
Russ Brown (pickscrape) wrote : | #1 |
Chuck Short (zulcss) wrote : | #2 |
on what arch is this? I am not able to reproduce it on x86_64.
Thanks
chuck
Changed in php5: | |
status: | New → Incomplete |
Russ Brown (pickscrape) wrote : | #3 |
$ uname -a
Linux dorian 2.6.24-18-generic #1 SMP Wed May 28 20:27:26 UTC 2008 i686 GNU/Linux
Chuck Short (zulcss) wrote : | #4 |
I was able to reproduce this error on both hardy and intrepid. As a consequence I have opened up a bug in the php bug tracker.
http://
Thanks for the bug report.
Regards
chuck
Changed in php5: | |
status: | Incomplete → Confirmed |
Nicolas Deschildre (ndeschildre) wrote : | #5 |
I confirm this bug, with php5-xmlrpc 5.2.4-2ubuntu5 !
Nicolas Deschildre (ndeschildre) wrote : | #6 |
Patch found on the original lib before the fork :
http://
Nicolas Deschildre (ndeschildre) wrote : | #7 |
(Commit comment: "Import Jeff Lawsons patches for XML datetime bug fixes")
Chuck Short (zulcss) wrote : | #8 |
Thanks ill be doing an SRU for php soon enough.
chuck
Changed in php5: | |
status: | Confirmed → In Progress |
Chuck Short (zulcss) wrote : | #9 |
This bug has been fixed for jaunty.
With the following patch attached this does not happen anymore. I have included the patch for your review.
Steps to Reproduce:
1. On i386 install php5-cgi php5-libxml.
2. Run the script in the above bug-report.
3. Expected result is that it doesnt cause PHP to have a stack smashing.
If you have any questions please let me know.
Regards
chuck
Chuck Short (zulcss) wrote : | #10 |
Martin Pitt (pitti) wrote : | #11 |
I rejected the 5.2.4-2ubuntu5.4 upload. Its changelog referred to the fix for this bug, but the upload didn't actually include it. Please upload a new version with this patch actually applied.
While you are at it, please clean up use_embedded_
Martin Pitt (pitti) wrote : | #12 |
Accepted into hardy-proposed, please test and give feedback here. Please see https:/
Changed in php5: | |
status: | New → Fix Committed |
Steve Beattie (sbeattie) wrote : | #13 |
I am able to reproduce this error with php5-xmlrpc 5.2.4-2ubuntu5.3 from hardy-updates on i386, and can confirm that php5-xmlrpc 5.2.4-2ubuntu5.4 in hardy-proposed address the issue. It also passes the security team's regression tests (I've added the above to their testsuite).
More checks for regressions would be useful, though.
Steve Beattie (sbeattie) wrote : | #14 |
One last comment: I rebuilt the php package (on i386) using the sources in hardy-proposed; as part of its build, php runs a fairly extensive set of regression tests. There are a couple of new failures versus the results (recorded in the security team's qa-regression-
Bug #20382 [2] (strtotime ("Monday", $date) produces wrong result on DST changeover) [ext/date/tests/bug20382-2.phpt]
Bug #41567 (json_encode() double conversion is inconsistent with PHP) [ext/json/tests/bug41567.phpt]
microtime() function [ext/standard/
None of these looks very serious, but might be worth double-checking. Thanks.
Launchpad Janitor (janitor) wrote : | #15 |
This bug was fixed in the package php5 - 5.2.4-2ubuntu5.4
---------------
php5 (5.2.4-2ubuntu5.4) hardy-proposed; urgency=low
* debian/rules:
- Use system tzdata.
* debian/
- Patch taken from intrepid, allows us to default to using the system
provided timezone database insteam of the one bundled with PHP.
(LP: #279980)
* debian/
- Patch taken from php CVS, prevents stack smashing when using xmlrpc and datetime.
(LP: #239513)
-- Chuck Short <email address hidden> Wed, 22 Oct 2008 13:08:33 +0000
Changed in php5: | |
status: | Fix Committed → Fix Released |
Martin Pitt (pitti) wrote : | #16 |
Chuck, please fix this in Jaunty ASAP.
Changed in php5: | |
assignee: | nobody → zulcss |
Chuck Short (zulcss) wrote : | #17 |
This should already be fixed.
Changed in php5: | |
status: | In Progress → Fix Released |
Steve Beattie (sbeattie) wrote : | #18 |
Per mdeslaurs (and confirmed by myself), this is still an issue in jaunty; re-opening.
Changed in php5 (Ubuntu Jaunty): | |
status: | Fix Released → Triaged |
Marc Deslauriers (mdeslaur) wrote : | #19 |
This is still an issue in Intrepid also.
Changed in php5 (Ubuntu Intrepid): | |
status: | New → Confirmed |
Changed in php5 (Ubuntu Intrepid): | |
assignee: | nobody → Marc Deslauriers (mdeslaur) |
Changed in php5 (Ubuntu Jaunty): | |
assignee: | Chuck Short (zulcss) → Marc Deslauriers (mdeslaur) |
Launchpad Janitor (janitor) wrote : | #20 |
This bug was fixed in the package php5 - 5.2.6.dfsg.
---------------
php5 (5.2.6.
* SECURITY UPDATE: certificate spoofing via null-byte certs (LP: #446313)
- debian/
in ext/openssl/
- CVE-2009-3291
* SECURITY UPDATE: denial of service via malformed exif images
(LP: #446313)
- debian/
nesting level in ext/exif/exif.c.
- CVE-2009-3292
* SECURITY UPDATE: safe_mode bypass via tempam function
- debian/
ext/
- CVE-2009-3557
* SECURITY UPDATE: open_basedir restrictions bypass via posix_mkfifo
- debian/
ext/
- CVE-2009-3558
* SECURITY UPDATE: denial of service via large number of files in
form-data POST request.
- debian/
directive and enforce in main/main.c, main/rfc1867.c.
- ATTENTION: this update changes previous php5 behaviour by limiting
the number of files in a POST request to 50. This may be increased
by adding a "max_file_uploads" directive to the php.ini configuration
file.
- CVE-2009-4017
* SECURITY UPDATE: safe_mode_
- debian/
ext/
- CVE-2009-4018
* debian/
- Prevent stack smashing when using xmlrpc and datetime. (LP: #239513)
-- Marc Deslauriers <email address hidden> Thu, 26 Nov 2009 08:05:57 -0500
Launchpad Janitor (janitor) wrote : | #21 |
This bug was fixed in the package php5 - 5.2.6-2ubuntu4.5
---------------
php5 (5.2.6-2ubuntu4.5) intrepid-security; urgency=low
* SECURITY UPDATE: file truncation via key with null byte
- debian/
in ext/dba/
- CVE-2008-7068
* SECURITY UPDATE: certificate spoofing via null-byte certs (LP: #446313)
- debian/
in ext/openssl/
- CVE-2009-3291
* SECURITY UPDATE: denial of service via malformed exif images
(LP: #446313)
- debian/
nesting level in ext/exif/exif.c.
- CVE-2009-3292
* SECURITY UPDATE: safe_mode bypass via tempam function
- debian/
ext/
- CVE-2009-3557
* SECURITY UPDATE: open_basedir restrictions bypass via posix_mkfifo
- debian/
ext/
- CVE-2009-3558
* SECURITY UPDATE: denial of service via large number of files in
form-data POST request.
- debian/
directive and enforce in main/main.c, main/rfc1867.c.
- ATTENTION: this update changes previous php5 behaviour by limiting
the number of files in a POST request to 50. This may be increased
by adding a "max_file_uploads" directive to the php.ini configuration
file.
- CVE-2009-4017
* SECURITY UPDATE: safe_mode_
- debian/
ext/
- CVE-2009-4018
* debian/
- Prevent stack smashing when using xmlrpc and datetime. (LP: #239513)
-- Marc Deslauriers <email address hidden> Thu, 26 Nov 2009 08:06:47 -0500
Changed in php5 (Ubuntu Intrepid): | |
status: | Confirmed → Fix Released |
Changed in php5 (Ubuntu Jaunty): | |
status: | Triaged → Fix Released |
Seems to have ignored my package choice...