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).
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.
Upstream patch in raptor (aforementioned patch is in LibreOffice): https://github.com/dajobe/raptor/commit/590681e546cd9aa18d57dc2ea1858cb734a3863f
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.
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
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):