-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Integer overflow in curl_multi_select #15547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for reporting! Indeed, that cast is wrong, but most important seems that we should check that |
confusion might come from the previous argument type. PHP expects ms so we check it fits integer boundaries before the cast. raising a warning at least for stable branches.
A comment on the patch. When the function returns Specifically, we can use As a code simplification, we could also assert |
sure, fair point for setting curl error. |
we have issue with but if i don't know if it's depended, but in php-8.4.0RC2 is used |
It s documented on the UPGRADING notes. |
@novotnicek Maybe you (or somebody) can explain what the main reason of error |
@thezagday You problem is not alpine17 or alpine20, but PHP patch version (third number in semver). I don't have problem with this warning. I see like problem, this warning ended in response body instead of log files, when my setting is |
Description
In this code line, the timeout is casted to
unsigned long
:php-src/ext/curl/multi.c
Line 190 in f952263
But the function expects a signed
int
, see https://curl.se/libcurl/c/curl_multi_wait.htmlIn consequence, passing a large timeout to the PHP function
curl_multi_select
causes undefined behavior according to the C standard. Usually it would it cause 100% CPU usage.PHP Version
PHP 8.3.10
Operating System
No response
The text was updated successfully, but these errors were encountered: