php-src/Zend/tests/weakrefs
Niels Dossche 39b8d5c871 Fix GH-13612: Corrupted memory in destructor with weak references
Inside `zend_object_std_dtor` the weakrefs are notified after the destruction
of properties already took place. In this test case, the destructor of an anon
class will be invoked due to the property destruction. That class has a
weak reference to its parent. This means that the destructor can access
parent properties that already have been destroyed, resulting in a UAF.
Fix this by notifying the weakrefs at the start of the object's
destruction.

Closes GH-13613.
2024-03-08 18:26:17 +01:00
..
gh13612.phpt Fix GH-13612: Corrupted memory in destructor with weak references 2024-03-08 18:26:17 +01:00
weakmap_basic_map_behavior.phpt
weakmap_dtor_exception.phpt
weakmap_error_conditions.phpt
weakmap_iteration.phpt
weakmap_multiple_weakrefs.phpt
weakmap_nested.phpt
weakmap_object_reference.phpt Fix WeakMap object reference offset causing TypeError (#8995) 2022-07-15 13:00:48 +02:00
weakmap_weakness.phpt
weakrefs_001.phpt
weakrefs_002.phpt
weakrefs_003.phpt
weakrefs_004.phpt
weakrefs_005.phpt
weakrefs_006.phpt Fix use after free when WeakMap is modified during field write 2021-11-20 16:52:25 -05:00