Bug #75862 [NEW]: PHP --disable-ipv6, curl --enable-ipv6

From: Date: Tue, 23 Jan 2018 17:16:42 +0000
Subject: Bug #75862 [NEW]: PHP --disable-ipv6, curl --enable-ipv6
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213677@lists.php.net to get a copy of this message
From: dpa-bugs at aegee dot org Operating system: Linux PHP version: 7.1.13 Package: cURL related Bug Type: Bug Bug description:PHP --disable-ipv6, curl --enable-ipv6 Description: ------------ When PHP is compiled with ./configure --disable-ipv6 and CURL supports IPv6, then an implicit curl_setopt($connection, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); must exist in ext/curl/. Otherwise php-fpm crashes, until adding the above line in the <?php code. Test script: --------------- This is what valgrind reports: ==16016== Thread 2: ==16016== Use of uninitialised value of size 8 ==16016== at 0x964380C: __libc_res_nsearch (res_query.c:395) ==16016== by 0x1A6108E1: ??? ==16016== by 0xDE1B13B: gaih_inet (getaddrinfo.c:870) ==16016== by 0xDE1C85C: getaddrinfo (getaddrinfo.c:2426) ==16016== by 0x858ABB3: Curl_getaddrinfo_ex (curl_addrinfo.c:124) ==16016== by 0x85955B0: getaddrinfo_thread (asyn-thread.c:279) ==16016== by 0x8592FBA: curl_thread_create_thunk (curl_threads.c:57) ==16016== by 0xA272063: start_thread (pthread_create.c:309) ==16016== by 0xDE2F62C: clone (clone.S:111) ==16016== Uninitialised value was created by a stack allocation ==16016== at 0x1A610859: ??? ==16016== ==16016== Invalid read of size 4 ==16016== at 0x964380C: __libc_res_nsearch (res_query.c:395) ==16016== by 0x1A6108E1: ??? ==16016== by 0xDE1B13B: gaih_inet (getaddrinfo.c:870) ==16016== by 0xDE1C85C: getaddrinfo (getaddrinfo.c:2426) ==16016== by 0x858ABB3: Curl_getaddrinfo_ex (curl_addrinfo.c:124) ==16016== by 0x85955B0: getaddrinfo_thread (asyn-thread.c:279) ==16016== by 0x8592FBA: curl_thread_create_thunk (curl_threads.c:57) ==16016== by 0xA272063: start_thread (pthread_create.c:309) ==16016== by 0xDE2F62C: clone (clone.S:111) ==16016== Address 0x2 is not stack'd, malloc'd or (recently) free'd ==16016== ==16016== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==16016== Access not within mapped region at address 0x2 ==16016== at 0x964380C: __libc_res_nsearch (res_query.c:395) ==16016== by 0x1A6108E1: ??? ==16016== by 0xDE1B13B: gaih_inet (getaddrinfo.c:870) ==16016== by 0xDE1C85C: getaddrinfo (getaddrinfo.c:2426) ==16016== by 0x858ABB3: Curl_getaddrinfo_ex (curl_addrinfo.c:124) ==16016== by 0x85955B0: getaddrinfo_thread (asyn-thread.c:279) ==16016== by 0x8592FBA: curl_thread_create_thunk (curl_threads.c:57) ==16016== by 0xA272063: start_thread (pthread_create.c:309) ==16016== by 0xDE2F62C: clone (clone.S:111) ==16016== If you believe this happened as a result of a stack ==16016== overflow in your program's main thread (unlikely but ==16016== possible), you can try to increase the size of the ==16016== main thread stack using the --main-stacksize= flag. ==16016== The main thread stack size used in this run was 8388608. ==16016== -- Edit bug report at https://bugs.php.net/bug.php?id=75862&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75862&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75862&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75862&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75862&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75862&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75862&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75862&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75862&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75862&r=support Expected behavior: https://bugs.php.net/fix.php?id=75862&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75862&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75862&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75862&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75862&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75862&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75862&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75862&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75862&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75862&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75862&r=mysqlcfg

« previous php.bugs (#213677) next »