Bug 1135170 - (CVE-2019-5436) VUL-0: CVE-2019-5436: curl: a heap buffer overflow exists in tftp_receive_packet that recevives data from a TFTP server
(CVE-2019-5436)
VUL-0: CVE-2019-5436: curl: a heap buffer overflow exists in tftp_receive_pac...
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P3 - Medium : Major
: ---
Assigned To: Security Team bot
Security Team bot
https://smash.suse.de/issue/232927/
CVSSv2:NVD:CVE-2019-5436:4.6:(AV:L/AC...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-15 08:42 UTC by Alexandros Toptsoglou
Modified: 2020-04-24 15:58 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandros Toptsoglou 2019-05-15 08:42:28 UTC
TFTP receive buffer overflow
============================

Project curl Security Advisory, May 22nd 2019 -
[Permalink](https://curl.haxx.se/docs/CVE-2019-5436.html)

VULNERABILITY
-------------

libcurl contains a heap buffer overflow in the function
(`tftp_receive_packet()`) that recevives data from a TFTP server. It calls
`recvfrom()` with the default size for the buffer rather than with the size
that was used to allocate it. Thus, the content that might overwrite the heap
memory is entirely controlled by the server.

The flaw exists if the user selects to use a "blksize" of 504 or smaller
(default is 512). The smaller size that is used, the larger the possible
overflow becomes.

Users chosing a smaller size than default should be rare as the primary use
case for changing the size is to make it larger.

It is rare for users to use TFTP across the Internet. It is most commonly used
within local networks.

We are not aware of any exploit of this flaw.

INFO
----

This bug was introduced in January 2009 in 
[commit 0516ce7786e95](https://github.com/curl/curl/commit/0516ce7786e95).

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

CWE-122: Heap-based Buffer Overflow

Severity: 1.8 (Low)

AFFECTED VERSIONS
-----------------

- Affected versions: libcurl 7.19.4 to and including 7.64.1
- Not affected versions: libcurl < 7.19.4 and >= libcurl 7.65.0

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

THE SOLUTION
------------

A [fix for CVE-2019-5436](https://curl.haxx.se/0001-tftp-use-the-current-blksize-for-recvfrom.patch) (The patch URL will be different in the final publication of this.)

RECOMMENDATIONS
--------------

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

  A - Upgrade curl to version 7.65.0

  B - Apply the patch to your version and rebuild

  C - do not use TFTP with curl

TIMELINE
--------

The issue was reported to the curl project on April 29, 2019. The patch was
communicated to the reporter on April 29, 2019. We contacted distros@openwall
on May 15.

curl 7.65.0 was released on May 22 2019, coordinated with the publication of
this advisory.

CREDITS
-------

Reported by l00p3r. Patch by Daniel Stenberg
Comment 3 Alexandros Toptsoglou 2019-05-15 08:52:56 UTC
It affects all the versions from 7.19.4 till and including 7.64.1.
Version 7.65 will contain the fix. 

Regarding our codestreams the following are tracked as affected: 
SLE-11-SP3:Update
SUSE:SLE-12:Update 
SUSE:SLE-12-SP4:Update 
SUSE:SLE-15:Update 

Regarding openSUSE:

TW, 15 and 42.3 are affected
Comment 4 Alexandros Toptsoglou 2019-05-15 08:54:01 UTC
Created attachment 805121 [details]
Patch
Comment 6 Pedro Monreal Gonzalez 2019-05-16 21:16:43 UTC
Thanks for the detailed description. I just submitted to all SLE codestreams and I'll update TW as soon as the new version is released.
Comment 7 Alexandros Toptsoglou 2019-05-22 07:49:14 UTC
now public
Comment 8 Pedro Monreal Gonzalez 2019-05-22 14:44:19 UTC
Submitted to Factory:
https://build.opensuse.org/request/show/704763
Comment 10 Swamp Workflow Management 2019-05-27 16:12:11 UTC
SUSE-SU-2019:1357-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1135170
CVE References: CVE-2019-5436
Sources used:
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15 (src):    curl-mini-7.60.0-3.20.1
SUSE Linux Enterprise Module for Basesystem 15 (src):    curl-7.60.0-3.20.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 11 Swamp Workflow Management 2019-05-28 13:11:19 UTC
SUSE-SU-2019:1363-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1135170
CVE References: CVE-2019-5436
Sources used:
SUSE OpenStack Cloud 7 (src):    curl-7.37.0-37.40.1
SUSE Linux Enterprise Software Development Kit 12-SP3 (src):    curl-7.37.0-37.40.1
SUSE Linux Enterprise Server for SAP 12-SP2 (src):    curl-7.37.0-37.40.1
SUSE Linux Enterprise Server for SAP 12-SP1 (src):    curl-7.37.0-37.40.1
SUSE Linux Enterprise Server 12-SP3 (src):    curl-7.37.0-37.40.1
SUSE Linux Enterprise Server 12-SP2-LTSS (src):    curl-7.37.0-37.40.1
SUSE Linux Enterprise Server 12-SP2-BCL (src):    curl-7.37.0-37.40.1
SUSE Linux Enterprise Server 12-SP1-LTSS (src):    curl-7.37.0-37.40.1
SUSE Linux Enterprise Server 12-LTSS (src):    curl-7.37.0-37.40.1
SUSE Linux Enterprise Desktop 12-SP3 (src):    curl-7.37.0-37.40.1
SUSE Enterprise Storage 4 (src):    curl-7.37.0-37.40.1
SUSE CaaS Platform ALL (src):    curl-7.37.0-37.40.1
SUSE CaaS Platform 3.0 (src):    curl-7.37.0-37.40.1
OpenStack Cloud Magnum Orchestration 7 (src):    curl-7.37.0-37.40.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 12 Swamp Workflow Management 2019-06-03 10:20:53 UTC
openSUSE-SU-2019:1492-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1135170
CVE References: CVE-2019-5436
Sources used:
openSUSE Leap 42.3 (src):    curl-7.37.0-51.1
Comment 13 Swamp Workflow Management 2019-06-04 16:13:13 UTC
openSUSE-SU-2019:1508-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1135170
CVE References: CVE-2019-5436
Sources used:
openSUSE Leap 15.1 (src):    curl-7.60.0-lp151.5.3.1, curl-mini-7.60.0-lp151.5.3.1
openSUSE Leap 15.0 (src):    curl-7.60.0-lp150.2.22.1
Comment 15 Swamp Workflow Management 2019-07-01 16:16:39 UTC
SUSE-SU-2019:1357-2: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1135170
CVE References: CVE-2019-5436
Sources used:
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15-SP1 (src):    curl-7.60.0-3.20.1, curl-mini-7.60.0-3.20.1
SUSE Linux Enterprise Module for Basesystem 15-SP1 (src):    curl-7.60.0-3.20.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 16 Marcus Meissner 2019-07-23 13:18:21 UTC
SUSE:SLE-12-SP4:Update seems missing.
Comment 17 Pedro Monreal Gonzalez 2019-07-23 14:56:31 UTC
(In reply to Marcus Meissner from comment #16)
> SUSE:SLE-12-SP4:Update seems missing.

Hmm, I missed that one. That codestream is not pulled when branching. Here is the submission:

   https://build.suse.de/request/show/197299
Comment 19 Swamp Workflow Management 2019-07-29 16:18:03 UTC
SUSE-SU-2019:2009-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1135170
CVE References: CVE-2019-5436
Sources used:
SUSE Linux Enterprise Software Development Kit 12-SP4 (src):    curl-7.60.0-4.6.1
SUSE Linux Enterprise Server 12-SP4 (src):    curl-7.60.0-4.6.1
SUSE Linux Enterprise Desktop 12-SP4 (src):    curl-7.60.0-4.6.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 21 Alexandros Toptsoglou 2020-04-24 15:58:10 UTC
Done