Skip to content

FPM: fix memory bugs in fpm_status.c - #23833

Open
1ma wants to merge 1 commit into
php:PHP-8.4from
1ma:fpm-status-leaks
Open

1ma wants to merge 1 commit into
php:PHP-8.4from
1ma:fpm-status-leaks

Conversation

@1ma

@1ma 1ma commented Sep 21, 2026

Copy link
Copy Markdown

Fixes a potential null dereference in fpm_status_export_to_zval, one use-after-free and several memory leaks in the sad paths of fpm_status_handle_request that I noticed after looking at #23808 with fresh eyes today.

Since I expect it will take some time to review the OpenMetrics PR I thought I'd PR these small fixes separately. I haven't added any new tests because I don't know how to trigger none of these error conditions, open to suggestions.

@1ma
1ma requested a review from bukka as a code owner September 21, 2026 22:19
fpm_status_export_to_zval() has a potential null derefence, and
the sad paths of fpm_status_handle_request() a use-after-free plus
several memory leaks.
@1ma
1ma changed the base branch from master to PHP-8.4 September 21, 2026 23:15
@1ma

1ma commented Sep 21, 2026

Copy link
Copy Markdown
Author

Sorry, changed target branch to PHP-8.4 since it's a simple bugfix.

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.

1 participant