xcache crashes during module shutdown when used together with ionCube Loader
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xcache |
Fix Released
|
Unknown
|
|||
xcache (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When xcache is loaded a s a PHP extension:
extension=xcache.so
Any attempt to execute an ionCube-encoded file crashes PHP w/backtrace like this:
#0 zm_shutdown_xcache (type=<value optimized out>, module_number=53) at /build/
#1 0x000000000069c2df in module_destructor (module=0xf0d3a0) at /build/
#2 0x00000000006a30e1 in zend_hash_
#3 0x00000000006a3368 in zend_hash_
#4 0x0000000000697045 in zend_shutdown () at /build/
#5 0x00000000006427ed in php_module_shutdown () at /build/
#6 0x000000000072625f in main (argc=-1969359736, argv=0x0) at /build/
This happens because xCache does not validate the result of
zend_extension *ext = zend_get_
called in zm_shutdown_xcache (PHP_MSHUTDOWN_
I don't know what ionCube Loader does but zend_get_
When xcache tries to dereference a NULL pointer in
if (ext->shutdown) {
we get a crash.
---
Ubuntu: 10.10 AMD64
xCache: 1.3.0, 1.3.1
tags: | added: patch |
Changed in xcache: | |
status: | Unknown → New |
Changed in xcache: | |
status: | New → Fix Released |
Patch that solves the issue by adding a check whether ext is not NULL.