PHP :: Bug #42189 :: xmlrpc_set_type() crashes php
| Bug #42189 | xmlrpc_set_type() crashes php | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2007-08-02 20:56 UTC | Modified: | 2007-09-18 19:52 UTC |
|
||||||||||
| From: | giunta dot gaetano at gmail dot com | Assigned: | ||||||||||||
| Status: | Closed | Package: | XMLRPC-EPI related | |||||||||||
| PHP Version: | 5.2.3 | OS: | windows xp or 2000 | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2007-08-02 20:56 UTC] giunta dot gaetano at gmail dot com
Description: ------------ Trying to cast a non-iso8601 conforming string to an xmlrpc datetime object crashes php. This happens if the characters in position 0 to 6 are too high in the ascii table, presumably moving the converted date too far away in the future This is repro with php 447 and 523 Note that it 'might' be the same bug as #22468 (the cause looks the same allright), with the difference that you get corrupted data on gentoo, and a core dump on winblows... Reproduce code: --------------- <?php // char ~ is 127 in ascii table, in xmlrpc.c '0' is subtracted, so we end up with the number 79 used for every digit of every date part // year = 79*1000+79*100+79*10+79, etc... // from date_from_ISO8601, in line 161 in xmlrpc.c // called from set_zval_xmlrpc_type in xmlrpc-epi-php.c $params = '~~~~~~~~~~~~~~~~~~'; $ok = xmlrpc_set_type ( $params, 'datetime' ); var_dump($ok); ?> Expected result: ---------------- false Actual result: -------------- CRASH'N'BURN
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2007-08-06 10:00 UTC] giunta dot gaetano at gmail dot com
[2007-08-15 19:49 UTC] giunta dot gaetano at gmail dot com
[2007-09-18 19:52 UTC] iliaa@php.net