Bug 1149495 - (CVE-2019-5481) VUL-0: CVE-2019-5481: curl: FTP-KRB double-free
(CVE-2019-5481)
VUL-0: CVE-2019-5481: curl: FTP-KRB double-free
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P3 - Medium : Normal
: ---
Assigned To: Security Team bot
Security Team bot
https://smash.suse.de/issue/241772/
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-09-05 05:57 UTC by Alexander Bergmann
Modified: 2020-07-10 13:17 UTC (History)
5 users (show)

See Also:
Found By: Security Response Team
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.
Comment 5 Marcus Meissner 2019-09-11 06:17:28 UTC
is public

FTP-KRB double-free
===================

Project curl Security Advisory, September 11th 2019 -
[Permalink](https://curl.haxx.se/docs/CVE-2019-5481.html)

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

libcurl can be told to use kerberos over FTP to a server, as set with the
`CURLOPT_KRBLEVEL` option.

During such kerberos FTP data transfer, the server sends data to curl in
blocks with the 32 bit size of each block first and then that amount of data
immediately following.

A malicious or just broken server can claim to send a very large block and if
by doing that it makes curl's subsequent call to `realloc()` to fail, curl
would then misbehave in the exit path and double-free the memory.

In practical terms, an up to 4 GB memory area may very well be fine to
allocate on a modern 64 bit system but on 32 bit systems it will fail.

Kerberos FTP is a rarely used protocol with curl. Also, Kerberos
authentication is usually only attempted and used with servers that the client
has a previous association with.

We are not aware of any exploit of this flaw.

INFO
----

This bug was introduced in November 2016 in [commit
0649433da53c7165f839e2](https://github.com/curl/curl/commit/0649433da53c7165f839e2).

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

CWE-415: Double Free

Severity: 6.3 (Medium)

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

- Affected versions: libcurl >= 7.52.0 to and including 7.65.3
- Not affected versions: libcurl < 7.52.0

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

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

A [fix for CVE-2019-5481](https://github.com/curl/curl/commit/9069838b30fb3b48af0123e39f664cea683254a5)

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

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

  A - Upgrade curl to version 7.66.0

  B - Apply the patch to your version and rebuild

  C - do not use `CURLOPT_KRBLEVEL`

TIMELINE
--------

The issue was reported to the curl project on September 3, 2019. The fix was done,
verified and communicated with the reporter on September 3, 2019.

We contacted distros@openwall on September 5.

This advisory was posted on September 11th 2019.

CREDITS
-------

Reported by Thomas Vegas. Patch by Daniel Stenberg.

Thanks a lot!

-- 

  / daniel.haxx.se | Get the best commercial curl support there is - from me
                   | Private help, bug fixes, support, ports, new features
                   | https://www.wolfssl.com/contact/
Comment 6 Pedro Monreal Gonzalez 2019-09-11 10:33:50 UTC
Factory submission:
   https://build.opensuse.org/request/show/730075
Comment 10 Swamp Workflow Management 2019-09-12 20:21:18 UTC
SUSE-SU-2019:2373-1: An update that fixes two vulnerabilities is now available.

Category: security (important)
Bug References: 1149495,1149496
CVE References: CVE-2019-5481,CVE-2019-5482
Sources used:
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15-SP1 (src):    curl-7.60.0-3.23.1, curl-mini-7.60.0-3.23.1
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15 (src):    curl-mini-7.60.0-3.23.1
SUSE Linux Enterprise Module for Basesystem 15-SP1 (src):    curl-7.60.0-3.23.1
SUSE Linux Enterprise Module for Basesystem 15 (src):    curl-7.60.0-3.23.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-09-16 19:11:15 UTC
SUSE-SU-2019:2381-1: An update that fixes two vulnerabilities is now available.

Category: security (important)
Bug References: 1149495,1149496
CVE References: CVE-2019-5481,CVE-2019-5482
Sources used:
SUSE Linux Enterprise Software Development Kit 12-SP4 (src):    curl-7.60.0-4.9.1
SUSE Linux Enterprise Server 12-SP4 (src):    curl-7.60.0-4.9.1
SUSE Linux Enterprise Desktop 12-SP4 (src):    curl-7.60.0-4.9.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-09-17 22:10:42 UTC
openSUSE-SU-2019:2149-1: An update that fixes two vulnerabilities is now available.

Category: security (important)
Bug References: 1149495,1149496
CVE References: CVE-2019-5481,CVE-2019-5482
Sources used:
openSUSE Leap 15.1 (src):    curl-7.60.0-lp151.5.6.1, curl-mini-7.60.0-lp151.5.6.1
Comment 13 Swamp Workflow Management 2019-09-24 13:11:32 UTC
openSUSE-SU-2019:2169-1: An update that fixes two vulnerabilities is now available.

Category: security (important)
Bug References: 1149495,1149496
CVE References: CVE-2019-5481,CVE-2019-5482
Sources used:
openSUSE Leap 15.0 (src):    curl-7.60.0-lp150.2.25.1
Comment 14 Alexandros Toptsoglou 2020-07-10 13:17:29 UTC
Done