Multiple heap-based buffer overflow flaws were found in the XML manifest encryption handling code of OpenOffice.org and LibreOffice: 1) Previously it was not checked if the particular tag was contained within expected parent tag, leading to possibility of child tag handler being able to write its data into different (than expected) parent handler sequence, leading to heap buffer overflow, 2) also a fixed size sequence was allocated to record properties of a particular XML tag, associated with XML element. By duplicating certain tags in XML manifest it was possible to write past the heap-based buffer bounds, 3) yet, the Base64 decoder implementation incorrectly assumed the length of ChecksumAttribute (input buffer) to be evenly divisible by 4, leading into the storage for output (Base64 decoded) buffer to be underallocated, resulting into heap buffer overflow. A remote attacker could provide a specially-crafted Open Document Text (.odt) file, that when opened would cause OpenOffice.org / LibreOffice to crash or, potentially execute arbitrary code with the privileges of the user running a tool from the suite.
This issue affects the versions of the openoffice.org package, as shipped with Red Hat Enterprise Linux 5 and 6. -- This issue affects the versions of the libreoffice package, as shipped with Fedora release of 15 and 16.
Created attachment 588505 [details] Proposed patches from Caolan McNamara for all three issues
The CVE identifier of CVE-2012-2665 has been assigned to this issue.
Acknowledgements: Upstream acknowledges Timo Warns as the original reporter of this issue.
External References: http://www.libreoffice.org/advisories/CVE-2012-2665/
This issue has been addressed in following products: Red Hat Enterprise Linux 5 Via RHSA-2012:1136 https://rhn.redhat.com/errata/RHSA-2012-1136.html
This issue has been addressed in following products: Red Hat Enterprise Linux 6 Via RHSA-2012:1135 https://rhn.redhat.com/errata/RHSA-2012-1135.html
Created libreoffice tracking bugs for this issue Affects: fedora-all [bug 845119]
libreoffice-3.4.5.2-18.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.