-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
curl_exec segmentation fault when using CURLOPT_PROXY - ? invalid free() ? #7236
Comments
Some debugging has been done by Natanael Copa https://gitlab.alpinelinux.org/alpine/aports/-/issues/12733#note_162131 that might be helpful to determine if this is a Curl or PHP issue... |
Reported-by: Alex Xu Reported-by: Phil E. Taylor Fixes #7236
Try #7237, I think it might fix the problem. |
I'm only a PHP type developer so would not know how to compile and test your change, sorry. The other guys over at Alpine Linux might though, I'll cross post it there. |
Reported-by: Alex Xu Reported-by: Phil E. Taylor Fixes #7236
upstream report curl/curl#7236 ref #12733
upstream report curl/curl#7236 fixes #12733 (cherry picked from commit 6c7f332)
5 hours to fix here... I love working with developers that take code seriously and provide timely fixes. You guys are awesome! Drop an email to [email protected] for some serious beer/coffee money as a thank you. |
Here's the release schedule: https://curl.se/dev/release-procedure.html#coming-dates So 21st of July 2021 is the next release. |
@jzakrzewski Thank you for the update !! |
Cross Posting from downstream: https://gitlab.alpinelinux.org/alpine/aports/-/issues/12733
This documents my Segmentation fault as requested here https://twitter.com/n_copa/status/1401971352073084928
My set up is docker containers. In development this is on an Intel Mac, in Production this is on a Digital Ocean server.
I was able to isolate and replicate the issue away from my production application (mySites.guru)
to replicate I started php:alpine3.13
docker run -it --rm php:alpine3.13 sh
out of the box this has:
My exact test case, with redacted domains/proxy is below, the problem can be replicated with php script:
Then run as
php test.php
In writing up these notes, I wanted to provide code that you could just run, so I took a proxy from https://spys.one/en/free-proxy-list/ and added it to the code, and used https://alpinelinux.org as the domain name, as there is no IP blocking of this exact proxy by https://alpinelinux.org - this is ruling out my initial theory and leads me to believe this seems to be an issue when using CURLOPT_PROXY to be sure. Your mileage might vary, I dont control these proxies and their responses.
When run I get:
As soon as you remove the
curl_setopt($ch, CURLOPT_PROXY, '70.169.141.35:3128');
line EVERYTHING works fast and as normal, and NEVER seg faults... unfortunatly my use case needs to route every request through a forward proxy :)I also tried with an upgraded Curl - apk upgrade gave:
The text was updated successfully, but these errors were encountered: