Skip to content

[pull] master from php:master#1047

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

[pull] master from php:master#1047
pull[bot] merged 9 commits into
turkdevops:masterfrom
php:master

Conversation

@pull

@pull pull Bot commented Jun 29, 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 : )

iliaal and others added 9 commits June 29, 2026 10:20
php_json_encode_serializable_object() holds a raw pointer to the object
across the jsonSerialize() call, then reads its recursion guard and
compares the returned value's identity against it. A user error handler
triggered from jsonSerialize() can drop the last reference to the object,
for example by nulling a reference that aliases the encoded array slot,
freeing it before those reads and causing a use-after-free.

Hold a reference on the object across the call. The array path already
guards against this with a ZVAL_COPY; the JsonSerializable object path
did not. Same use-after-free class as GH-21024 in var_dump().
XXH3_state_t requires 64-byte alignment for its acc, customSecret, and
buffer members, but php_hash_alloc_context() used ecalloc(), which only
guarantees alignof(max_align_t) (typically 16 bytes on x86_64). When heap
layout broke that assumption, xxhash's aligned loads segfaulted. Add a
context_align field to php_hash_ops; when set, php_hash_alloc_context()
over-allocates and manually aligns the returned pointer, storing the offset
for php_hash_free_context() to recover the original allocation.

Fixes GH-18173
Closes GH-21668
* PHP-8.4:
  Fix GH-18173: ext/hash relies on implementation-defined malloc alignment
* PHP-8.5:
  Fix GH-18173: ext/hash relies on implementation-defined malloc alignment
IntlChar methods could leave stale global intl error state after a later successful call.

Reset the intl error state when entering each IntlChar method so successful calls report U_ZERO_ERROR.

Closes #22500
* PHP-8.4:

  ext/intl: Reset IntlChar error state on method entry (#22500)
* PHP-8.5:

  ext/intl: Reset IntlChar error state on method entry (#22500)
…ket_recvfrom.

Take a new approach from PR #17926: instead of parsing ethernet/IP/TCP/UDP
headers in C, expose the raw frame as a string to userland, letting users
handle protocol decoding safely in PHP. This addresses the security
concerns raised during review.

Also rename opaque argument variables (arg1..arg6) to meaningful
names in both functions and fix a bug in the commented-out sendto
code that was using &sin instead of &sll.

close GH-21631
@pull pull Bot locked and limited conversation to collaborators Jun 29, 2026
@pull pull Bot added the ⤵️ pull label Jun 29, 2026
@pull pull Bot merged commit c1a6258 into turkdevops:master Jun 29, 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.

5 participants