Skip to content

ext/spl: SplDoublyLinkedList::serialize() use-after-free on element r… - #23388

Open
devnexen wants to merge 1 commit into
php:masterfrom
devnexen:gh23385
Open

ext/spl: SplDoublyLinkedList::serialize() use-after-free on element r…#23388
devnexen wants to merge 1 commit into
php:masterfrom
devnexen:gh23385

Conversation

@devnexen

Copy link
Copy Markdown
Member

…emoval.

Fix #23385

The serialization loop passed php_var_serialize() a pointer into the list element itself, so a userland __serialize() unsetting that entry freed both the element and its payload while the serializer was still walking them. Serialize a copy of the element data instead, which outlives the callback.

…emoval.

Fix php#23385

The serialization loop passed php_var_serialize() a pointer into the list
element itself, so a userland __serialize() unsetting that entry freed both
the element and its payload while the serializer was still walking them.
Serialize a copy of the element data instead, which outlives the callback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use-after-free in SplDoublyLinkedList::serialize()

1 participant