php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76416 cURL request to SSL resource crashes with segmentation fault
Submitted: 2018-06-05 14:47 UTC Modified: 2018-08-19 17:59 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: vojta at webow dot ski Assigned: bukka (profile)
Status: Not a bug Package: cURL related
PHP Version: 7.2.6 OS: Alpine 3.7.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
37 - 26 = ?
Subscribe to this entry?

 
 [2018-06-05 14:47 UTC] vojta at webow dot ski
Description:
------------
Custom PHP-FPM in docker, it works just fine with libressl

OpenSSL 1.0.2o
curl 7.60.0

'./configure'  '--enable-fpm' '--with-fpm-user=www-data' '--with-fpm-group=www-data' '--enable-cli' '--build=x86_64-linux-musl' '--with-config-file-path=/usr/local/etc/php' '--with-config-file-scan-dir=/usr/local/etc/php/conf.d' '--with-php-config' '--with-mysqli' '--with-pdo-mysql' '--with-openssl' '--with-gd' '--with-iconv' '--with-zlib' '--with-curl' '--with-png-dir' '--with-jpeg-dir' '--with-freetype-dir' '--with-xmlrpc' '--with-mhash' '--enable-xml' '--enable-shmop' '--enable-sysvsem' '--enable-inline-optimization' '--enable-mbregex' '--enable-gd-native-ttf' '--enable-pcntl' '--enable-sockets' '--enable-zip' '--enable-soap' '--enable-session' '--enable-opcache' '--enable-bcmath' '--enable-exif' '--enable-fileinfo' '--enable-ftp' '--with-libedit' '--disable-cgi' '--disable-rpath' '--enable-mbstring' '--enable-mysqlnd' '--with-pcre-regex=/usr' 'build_alias=x86_64-linux-musl'

Test script:
---------------
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.wordpress.org/plugins/info/1.1');
curl_exec($ch);



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-05 22:15 UTC] rasmus@php.net
-Status: Open +Status: Feedback
 [2018-06-05 22:15 UTC] rasmus@php.net
Works fine for me here with 7.2.6. What does the backtrace look like in that segfault?
 [2018-06-06 08:37 UTC] vojta at webow dot ski
-Status: Feedback +Status: Open
 [2018-06-06 08:37 UTC] vojta at webow dot ski
GDB output:
Starting program: /usr/local/bin/php test.php
[New LWP 37]
[LWP 37 exited]

Thread 1 "php" received signal SIGSEGV, Segmentation fault.
0x00007ffff59f538f in ?? () from /lib/libssl.so.44

I would be more than happy to provide more output, if you point me to the right direction.

Vojta
 [2018-08-19 17:58 UTC] bukka@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: bukka
 [2018-08-19 17:58 UTC] bukka@php.net
You need to make sure that curl is linked with the correct OpenSSL version and ideally it should be the same one that you use with openssl ext. You can't mix LibreSSL and OpenSSL of course.

In any case this is not an issue in openssl ext because curl is linked with OpenSSL lib and it's using its own API.
 [2018-08-19 17:59 UTC] bukka@php.net
-Package: OpenSSL related +Package: cURL related
 [2018-08-19 17:59 UTC] bukka@php.net
-Status: Closed +Status: Not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 08:01:28 2024 UTC