Lucene search

K
securityvulnsSecurityvulnsSECURITYVULNS:DOC:28346
HistoryAug 13, 2012 - 12:00 a.m.

[PRE-SA-2012-05] Multiple heap-based buffer overflows in LibreOffice / OpenOffice

2012-08-1300:00:00
vulners.com
8

PRE-CERT Security Advisory

  • Advisory: PRE-SA-2012-05
  • Released on: 6 August 2012
  • Affected product: LibreOffice < 3.5.5
    Apache OpenOffice <= 3.4.0
  • Impact: code execution
  • Origin: encrypted office files
  • CVSS Base Score: 9.3
    Impact Subscore: 10
    Exploitability Subscore: 8.6
    CVSS Vector: (AV:N/AC:M/Au:N/C:C/I:C/A:C)
  • Credit: Timo Warns (PRESENSE Technologies GmbH)
  • CVE Identifier: CVE-2012-2665

Summary

Multiple issues have been identified in LibreOffice / OpenOffice that
allow to execute arbitrary code via specially crafted office files.

Elements outside expected parent elements
-----------------------------------------

Initially, the aSequence attribute of a ManifestImport instance has
no memory allocated for PropertyValue elements.
ManifestImport::startElement&#40;&#41; &#40;re&#41;allocates memory when
a &quot;manifest:file-entry&quot; XML element is encountered in the manifest
file. The property values are, for example, accessed when
a &quot;manifest:encryption-data&quot; XML element is found. If such
elements are located outside an expected parent element
&quot;manifest:file-entry&quot;, ManifestImport::startElement&#40;&#41; accesses
aSequence out-of-bounds.


Writes beyond fixed size buffer
-------------------------------

ManifestImport::startElement&#40;&#41; allocates memory for 12 &#40;=
PKG_SIZE_ENCR_MNFST&#41; PropertValue elements. If
a &quot;manifest:file-entry&quot; XML element has child elements that cause
startElement&#40;&#41; to access more than 12 PropertValues, startElement&#40;&#41;
accesses aSequence out-of-bounds.


Base64Codec::decodeBase64&#40;&#41;
---------------------------

ManifestImport::startElement&#40;&#41; calls Base64Codec::decodeBase64&#40;&#41; to
decode the XML attributes for checksums, initialization vectors, and
salt values. Base64Codec::decodeBase64&#40;&#41; implicitly assumes that the
source buffer sBuffer contains a number of characters divisible by 4.
If this is not the case, the called method FourByteToThreeByte&#40;&#41;
writes up to 3 bytes past a buffer allocated on the heap.

Solution

The issue has been fixed in LibreOffice 3.5.5.
An update to Apache OpenOffice is pending.

References

http://www.libreoffice.org/advisories/CVE-2012-2665/
https://bugzilla.redhat.com/show_bug.cgi?id=826077

When further information becomes available, this advisory will be
updated. The most recent version of this advisory is available at:

http://www.pre-cert.de/advisories/PRE-SA-2012-05.txt

Contact

PRE-CERT can be reached under [email protected]. For PGP key
information, refer to http://www.pre-cert.de/.

Related for SECURITYVULNS:DOC:28346