[pull] master from php:master#1037
Merged
Merged
Conversation
Current code assumes having ldap_extended_operation_s() also means having ldap_extended_operation().
zend_jit_do_fcall() loaded the callee run_time_cache through the closure direct-pointer shortcut whenever the call frame was flagged as a closure call. That flag is set for every ZEND_INIT_DYNAMIC_CALL, but a dynamic call may resolve to a non-closure function whose run_time_cache is a zend_map_ptr offset. The raw offset was then stored into EX(run_time_cache) without resolving it through CG(map_ptr_base), and a later cache lookup dereferenced a bogus address. Restrict the shortcut to statically-known closures. Unknown dynamic calls fall through to the general path, which resolves both offsets and direct pointers. Fixes GH-22443 Closes GH-22459
* PHP-8.5: JIT: Fix run_time_cache offset stored without map_ptr dereference
shmop_read() held the read length in an int while count and shmop->size are zend_long and the bounds checks above validate against the full 64-bit size. On a shared-memory segment larger than INT_MAX a read whose length sets the int sign bit was sign-extended into the size_t length argument of zend_string_init(), requesting a near-SIZE_MAX allocation; other truncated lengths silently returned a wrong-sized string. Hold the length in a zend_long, matching the zend_long writesize already used in shmop_write(). Closes GH-22425
* PHP-8.4: Fix int truncation of read length in shmop_read()
* PHP-8.5: Fix int truncation of read length in shmop_read()
collator_sort() and collator_asort() sort the array in place while the comparator may run a __toString() that appends to the same array through a reference, reallocating its storage under the running sort. Sort a copy and swap it back, matching usort(). Closes GH-22467
* PHP-8.4: Fix use-after-free in Collator::sort() with a mutating comparator
* PHP-8.5: Fix use-after-free in Collator::sort() with a mutating comparator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )