Bug 1549636 (CVE-2018-7485)

Summary: CVE-2018-7485 unixODBC: Insecure buffer copy in SQLWriteFileDSN function in odbcinst/SQLWriteFileDSN.c
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: alanm, databases-maint, hhorak, jstanek, mschorm, odubaj, praiskup, tgl, tomm.momi, tvainio, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: unixODBC 2.3.6pre Doc Type: If docs needed, set a value
Doc Text:
An argument order confusion flaw was found in the SQLWriteFileDSN API of unixODBC. This could only be exploited via a malicious ODBC database connector package with the maximum impact being a denial of service.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 19:18:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1549637, 1571530, 1571531, 1571532, 1891969    
Bug Blocks: 1548307    

Description Pedro Sampaio 2018-02-27 14:36:51 UTC
The SQLWriteFileDSN function in odbcinst/SQLWriteFileDSN.c in unixODBC 2.3.5 has strncpy arguments in the wrong order, which allows attackers to cause a denial of service or possibly have unspecified other impact.

Upstream patch:

https://github.com/lurcher/unixODBC/commit/45ef78e037f578b15fc58938a3a3251655e71d6f#diff-d52750c7ba4e594410438569d8e2963aL24

Comment 1 Pedro Sampaio 2018-02-27 14:37:13 UTC
Created unixODBC tracking bugs for this issue:

Affects: fedora-all [bug 1549637]

Comment 3 Huzaifa S. Sidhpurwala 2018-12-11 03:56:31 UTC
Analysis:

This flaw is essentially an argument order confusion in the SQLWriteFileDSN API, can only be exploited via a malicious ODBC database connector package and can possible cause Denial of Service only. We believe that arbitrary code execution is not possible, therefore this flaw has been rated as having Moderate security impact.

Comment 4 errata-xmlrpc 2019-08-06 12:41:55 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2019:2336 https://access.redhat.com/errata/RHSA-2019:2336

Comment 5 Product Security DevOps Team 2019-08-06 19:18:27 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2018-7485

Comment 12 errata-xmlrpc 2020-11-10 10:04:05 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.6 Extended Update Support

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