Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#9925 closed enhancement (fixed)


Reported by: bdubbs@… Owned by: bdubbs@…
Priority: normal Milestone: 8.2
Component: BOOK Version: SVN
Severity: normal Keywords:


New point version.

Change History (3)

comment:1 by bdubbs@…, 5 years ago

Owner: changed from blfs-book@… to bdubbs@…
Status: newassigned

comment:2 by bdubbs@…, 5 years ago

Resolution: fixed
Status: assignedclosed

Fixed at revision 19412.

comment:3 by Douglas R. Reno, 5 years ago

As Chey and I go through our email for the past month, we have been updating tickets with security information as we find necessary.

IMAP FETCH response out of bounds read

Project curl Security Advisory, October 23rd 2017 -


libcurl contains a buffer overrun flaw in the IMAP handler.

An IMAP FETCH response line indicates the size of the returned data, in number
of bytes. When that response says the data is zero bytes, libcurl would pass
on that (non-existing) data with a pointer and the size (zero) to the
deliver-data function.

libcurl's deliver-data function treats zero as a magic number and invokes
strlen() on the data to figure out the length. The strlen() is called on a
heap based buffer that might not be zero terminated so libcurl might read
beyond the end of it into whatever memory lies after (or just crash) and then
deliver that to the application as if it was actually downloaded.

We are not aware of any exploit of this flaw.


This bug was introduced in commit
[ec3bb8f727](, December 2009,
when the initial support for IMAP was introduced.

The Common Vulnerabilities and Exposures (CVE) project has assigned the name
CVE-2017-1000257 to this issue.


- Affected versions: libcurl 7.20.0 to and including 7.56.0
- Not affected versions: libcurl < 7.20.0 and >= 7.56.1

curl is used by many applications, but not always advertised as such.


In libcurl version 7.56.1, a zero bytes response is not passed on.

A [patch for CVE-2017-1000257]( is


We suggest you take one of the following actions immediately, in order of

 A - Upgrade curl to version 7.56.1

 B - Apply the patch to your version and rebuild



It was reported to the curl project on October 6, 2017.  We contacted
distros@openwall on October 17.

curl 7.56.1 was released on October 23 2017, coordinated with the publication
of this advisory.


Reported by Brian Carpenter, Geeknik Labs and 0xd34db347. Also independently
detected by and reported by the OSS-Fuzz project. Patch by Daniel Stenberg.

Thanks a lot!
Note: See TracTickets for help on using tickets.