Bug 1552631 (CVE-2018-1000121)

Summary: CVE-2018-1000121 curl: LDAP NULL pointer dereference
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: bgollahe, bodavis, csutherl, dbhole, erik-fedora, gzaronik, hhorak, jclere, john.j5live, jorton, kanderso, kdudka, lzachar, mbabacek, mike, mturk, omajid, paul, rwagner, security-response-team, sisharma, slawomir, twalsh
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: curl 7.59.0 Doc Type: If docs needed, set a value
Doc Text:
A NULL pointer dereference flaw was found in the way libcurl checks values returned by the openldap ldap_get_attribute_ber() function. A malicious LDAP server could use this flaw to crash a libcurl client application via a specially crafted LDAP reply.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-10 10:16:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1555207, 1555208, 1555209, 1555210, 1555221, 1565031, 1802780, 1802790    
Bug Blocks: 1552634    
Attachments:
Description Flags
upstream patch none

Description Andrej Nemec 2018-03-07 13:11:01 UTC
It was found that curl might dereference a near-NULL address when getting an LDAP URL.

The function `ldap_get_attribute_ber()` is called to get attributes, but it
turns out that it can return `LDAP_SUCCESS` and still return a `NULL` pointer
in the result pointer when getting a particularly crafted response.

libcurl-using applications that allow LDAP URLs, or that allow redirects to
LDAP URLs could be made to crash by a malicious server.

Comment 1 Andrej Nemec 2018-03-07 13:11:03 UTC
Acknowledgments:

Name: the Curl project
Upstream: Dario Weisser

Comment 2 Andrej Nemec 2018-03-07 13:18:39 UTC
Created attachment 1405334 [details]
upstream patch

Comment 3 Adam Mariš 2018-03-14 07:29:45 UTC
External References:

https://curl.haxx.se/docs/adv_2018-97a2.html

Comment 4 Adam Mariš 2018-03-14 07:33:13 UTC
Created mingw-curl tracking bugs for this issue:

Affects: fedora-all [bug 1555207]


Created curl tracking bugs for this issue:

Affects: fedora-all [bug 1555209]


Created mingw-curl tracking bugs for this issue:

Affects: epel-7 [bug 1555208]

Comment 7 Cedric Buissart 2018-03-14 10:31:20 UTC
Upstream fix:
 openldap: check ldap_get_attribute_ber() results for NULL before using
https://github.com/curl/curl/commit/9889db0433

Comment 11 errata-xmlrpc 2018-10-30 07:43:23 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2018:3157 https://access.redhat.com/errata/RHSA-2018:3157

Comment 12 errata-xmlrpc 2018-11-13 08:35:18 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS

Via RHSA-2018:3558 https://access.redhat.com/errata/RHSA-2018:3558

Comment 15 errata-xmlrpc 2020-02-18 14:44:01 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.5 Extended Update Support

Via RHSA-2020:0544 https://access.redhat.com/errata/RHSA-2020:0544

Comment 16 errata-xmlrpc 2020-02-25 12:11:29 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.4 Advanced Update Support
  Red Hat Enterprise Linux 7.4 Update Services for SAP Solutions
  Red Hat Enterprise Linux 7.4 Telco Extended Update Support

Via RHSA-2020:0594 https://access.redhat.com/errata/RHSA-2020:0594