Bug 1896120 (CVE-2017-18926) - CVE-2017-18926 raptor: heap-based buffer overflows due to an error in calculating the maximum nspace declarations for the XML writer
Summary: CVE-2017-18926 raptor: heap-based buffer overflows due to an error in calcula...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2017-18926
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1896534
Blocks: 1896121
TreeView+ depends on / blocked
 
Reported: 2020-11-09 19:00 UTC by Guilherme de Almeida Suckevicz
Modified: 2021-05-18 20:37 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 20:37:06 UTC
Embargoed:


Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2020-11-09 19:00:46 UTC
raptor_xml_writer_start_element_common in raptor_xml_writer.c in Raptor RDF Syntax Library 2.0.15 miscalculates the maximum nspace declarations for the XML writer, leading to heap-based buffer overflows (sometimes seen in raptor_qname_format_as_xml).

Reference:
https://www.openwall.com/lists/oss-security/2017/06/07/1

Upstream patch:
https://github.com/LibreOffice/core/blob/master/external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1

Comment 3 Todd Cullum 2020-11-10 20:14:21 UTC
Flaw summary:

When raptor2 processes a crafted input file, it could execute a heap-buffer-overflow -> out-of-bounds write due to improper calculation of `nspace_max_count` in raptor_xml_writer.c. In the context of RHEL-8, this library is used by libreoffice to parse files. If it were affected, an attacker who could social engineer a victim into opening a crafted file could trigger this flaw and impact application availability or in more rare circumstances, data integrity. However, libreoffice shipped with RHEL-8 has already been patched and thus libreoffice is notaffected.

Comment 4 Todd Cullum 2020-11-10 20:26:02 UTC
Upstream patch in raptor (aforementioned patch is in LibreOffice): https://github.com/dajobe/raptor/commit/590681e546cd9aa18d57dc2ea1858cb734a3863f

Comment 5 Todd Cullum 2020-11-10 20:29:25 UTC
Statement:

LibreOffice as shipped with Red Hat Enterprise Linux 8 is notaffected by this flaw as the version of raptor used in LibreOffice already has the patch.

Comment 9 errata-xmlrpc 2021-05-18 15:30:44 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:1842 https://access.redhat.com/errata/RHSA-2021:1842

Comment 10 Product Security DevOps Team 2021-05-18 20:37:06 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-2017-18926


Note You need to log in before you can comment on or make changes to this bug.