Skip to content

Fix upload progress counters after separating the progress array - #24476

Closed
pdymidziuk wants to merge 2 commits into
php:masterfrom
pdymidziuk:fix/php85-upload-progress-bucket-pointers
Closed

pdymidziuk wants to merge 2 commits into
php:masterfrom
pdymidziuk:fix/php85-upload-progress-bucket-pointers

Conversation

@pdymidziuk

Copy link
Copy Markdown

With upload_progress.cleanup=0, a multipart request containing form data
after its final file can persist an incomplete bytes_processed value.
The end callback separates progress->data, then writes through a cached
bucket pointer that still belongs to the previous array.

Resolve the bytes_processed bucket from its current array on each access
instead of storing pointers across multipart events. Preserve the existing
in-place updates of progress arrays shared with session data.

Add a regression covering two files followed by a large form field. It
fails before this change and passes afterwards. Docker debug builds passed
267 session tests with one pre-existing XFAIL, plus all RFC1867 tests with
USE_ZEND_ALLOC=0.

This is a targeted correctness fix and hardening change, not a verified
fix for CVE-2026-109618 or CVE-2026-109619. No RCE was reproduced.

DanielEScherzer and others added 2 commits October 6, 2026 16:06
With upload_progress.cleanup=0, a multipart request containing form data
after its final file can persist an incomplete bytes_processed value.
The end callback separates progress->data, then writes through a cached
bucket pointer that still belongs to the previous array.

Resolve the bytes_processed bucket from its current array on each access
instead of storing pointers across multipart events. Preserve the existing
in-place updates of progress arrays shared with session data.

Add a regression covering two files followed by a large form field. It
fails before this change and passes afterwards. Docker debug builds passed
267 session tests with one pre-existing XFAIL, plus all RFC1867 tests with
USE_ZEND_ALLOC=0.

This is a targeted correctness fix and hardening change, not a verified
fix for CVE-2026-109618 or CVE-2026-109619. No RCE was reproduced.
@iluuu1994

Copy link
Copy Markdown
Member

Stop please. The proper fix is coming in a few hours.

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.

3 participants