You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Heap UAF at ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DATA_VAR_HANDLER #10169
What PHP configuration did you use to trigger this bug?
I'm trying to reproduce this issue using ./sapi/cli/php with the binary compiled with ASAN. I tried both with opcache on and off.
Thanks for the additional info.
I tried reproducing this in a variety of ways, but I still cannot. I tried it on 8.1.x, 8.2.x and the commit you referenced, but none worked.
Is the php.ini file the default one, and does ./php-fuzz-execute do anything special (or where can I obtain it?)
I can reproduce it as well now. Thanks.
It seems that in zend_std_write_property, the conversion during zend_verify_property_type in the write_std_property: label path causes zobj to still refer to the old object instance instead of the new one.
Activity
ndossche commentedon Dec 26, 2022
What PHP configuration did you use to trigger this bug?
I'm trying to reproduce this issue using
./sapi/cli/phpwith the binary compiled with ASAN. I tried both with opcache on and off.Changochen commentedon Dec 27, 2022
Hi, thanks for the investigation.
My config is:
ndossche commentedon Dec 27, 2022
Thanks for the additional info.
I tried reproducing this in a variety of ways, but I still cannot. I tried it on 8.1.x, 8.2.x and the commit you referenced, but none worked.
Is the php.ini file the default one, and does
./php-fuzz-executedo anything special (or where can I obtain it?)Changochen commentedon Dec 28, 2022
Sorry for the confusion. With
--enable-fuzzer, you will find./php-fuzz-executeinsapi/fuzzer.I checked the above poc and found that it didn't crash the
phpbinary. So I modified it a bit and got one that crashedphpThis will trigger an invalid pointer deref in
phpand heap UAF write atphp-fuzz-execute.ndossche commentedon Dec 28, 2022
I can reproduce it as well now. Thanks.
It seems that in
zend_std_write_property, the conversion duringzend_verify_property_typein thewrite_std_property:label path causeszobjto still refer to the old object instance instead of the new one.Fix use-after-free in write_property when object is released
Fix use-after-free in write_property when object is released