Skip to content

sapi/fuzzer: Fetch function and call it directly instead of using a zval to hold the name #19030

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Jul 6, 2025

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Jul 4, 2025

No description provided.

@Girgias Girgias requested a review from nielsdos July 4, 2025 11:17
@Girgias Girgias force-pushed the fuzzer-call-fun branch from 186f816 to 843c5f0 Compare July 4, 2025 11:18
@@ -294,9 +294,11 @@ int fuzzer_do_request_from_buffer(
void fuzzer_call_php_func_zval(const char *func_name, int nargs, zval *args) {
zval retval, func;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You still have the func variable, which is still zval_ptr_dtor'ed at the end. That will now operate on uninitialized memory because it's never filled in / used.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@Girgias Girgias marked this pull request as ready for review July 6, 2025 00:29
@Girgias Girgias merged commit c338057 into php:master Jul 6, 2025
9 checks passed
@Girgias Girgias deleted the fuzzer-call-fun branch July 6, 2025 00:29
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants