Skip to content

[pull] master from php:master#1037

Merged
pull[bot] merged 10 commits into
turkdevops:masterfrom
php:master
Jun 26, 2026
Merged

[pull] master from php:master#1037
pull[bot] merged 10 commits into
turkdevops:masterfrom
php:master

Conversation

@pull

@pull pull Bot commented Jun 26, 2026

Copy link
Copy Markdown

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 : )

petk and others added 10 commits June 26, 2026 17:44
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
@pull pull Bot locked and limited conversation to collaborators Jun 26, 2026
@pull pull Bot added the ⤵️ pull label Jun 26, 2026
@pull pull Bot merged commit 565da77 into turkdevops:master Jun 26, 2026
1 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants