Bug 997185

Summary: sendrecv.c example incorrect type for sockfd
Product: Red Hat Enterprise Linux 6 Reporter: Leonard den Ottolander <leonard-rh-bugzilla>
Component: curlAssignee: Kamil Dudka <kdudka>
Status: CLOSED ERRATA QA Contact: Stefan Kremen <skremen>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.4CC: ovasik
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: curl-7.19.7-43.el6 Doc Type: Bug Fix
Doc Text:
Previously, the code examples installed by the libcurl-devel package used a wrong data type for sockets when calling the curl_easy_getinfo() function. This resulted in stack smashing on some architectures because the API defines its own data type (of different size) for sockets. The examples have been fixed to use the correct data type for sockets, so the stack smashing no longer happens.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-22 05:42:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Leonard den Ottolander 2013-08-14 21:12:51 UTC
Description of problem:

The example /usr/share/doc/libcurl-devel-7.19.7/sendrecv.c uses a parameter sockfd of type int in the call to curl_easy_getinfo() where it should use a long. This causes a bufferoverflow that makes the binary fail if no optimization is used for its compilation.

Because the resulting binary seems to work correctly when optimization is used I mistakenly suspected gcc to be the cause of this issue (bug #996793).

The issue seems to be fixed upstream.


Version-Release number of selected component (if applicable):

libcurl-devel-7.19.7-37

Comment 1 Kamil Dudka 2013-08-15 12:30:34 UTC
upstream commit:

https://github.com/bagder/curl/commit/bcfb9ea3

Comment 10 errata-xmlrpc 2015-07-22 05:42:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-1254.html