what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

ngs-openoffice.txt

ngs-openoffice.txt
Posted Jan 5, 2007
Authored by John Heasman | Site ngssoftware.com

Three heap overflows have been discovered in OpenOffice versions below 2.1.0 and StarOffice 6, 7 and 8. If an attacker can coax a user into opening a specially crafted document then the attacker can execute arbitrary code in the security context of their victim.

tags | advisory, overflow, arbitrary
SHA-256 | 0bc1c17478066157d522005ac5c33b04a9f2b3857860aeb56b9a06aedd499e60

ngs-openoffice.txt

Change Mirror Download
John Heasman of NGSSoftware has discovered several high risk vulnerabilities
in the handling of WMF and EMF graphics formats within the OpenOffice
StarOffice suite.

The vulnerabilities, three heap overflows, affect OpenOffice 2.1.0 and
StarOffice 6, 7 and 8. If an attacker can coax a user into opening a
specially crafted document then the attacker can execute arbitrary code in
the security context of their victim.

Details
*******
1) From svtools\source\filter.vcl\wmf\winwmf.cxx

case W_META_ESCAPE :
...
sal_uInt32 i, nStringLen, nDXCount;
...
aMemoryStream >> aPt.X()
>> aPt.Y()
>> nStringLen;

sal_Unicode* pBuf = aString.AllocBuffer( (sal_uInt16)nStringLen );
for ( i = 0; i < nStringLen; i++ )
aMemoryStream >> pBuf[ i ];

nStringLen is a sal_uInt32; it is cast to a sal_uInt16 for the allocation
then the original 32 bit value is used as a count to fill the buffer, thus
any length greater than 0xFFFF results in a heap overflow. Code execution is
possible via a function pointer overwrite or arbitrary DWORD overwrite if
the user opens a malicious WMF, or a container document (such as a Microsoft
Word document) in which it is embedded.

2) From svtools\source\filter.vcl\wmf\enhwmf.cxx

case EMR_POLYPOLYGON :

INT32 i, nPoly, nGesPoints;
...
*pWMF >> nPoly >> nGesPoints;
...
pPtAry = (Point*) new char[ nGesPoints * sizeof(Point) ];

for ( i = 0; i < nGesPoints; i++ )
{
*pWMF >> nX32 >> nY32;
pPtAry[ i ] = Point( nX32, nY32 );
}

nGesPoints * sizeof(Point) will result in an integer wrap if nGesPoints is >
(0x100000000 / sizeof(Point)).

Code execution is possible via a function pointer overwrite.

3) As above but for EMR_POLYPOLYGON16 record.


Solution
********

These issues have now been resolved; OpenOffice and StarOffice users are
strongly recommended to install the relevant patch, available from the
OpenOffice and SunSolve websites:

http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/xprod-StarOffice=
http://download.openoffice.org/2.1.0/index.html

NGSSoftware Insight Security Research
http://www.ngssoftware.com
http://www.databasesecurity.com/
http://www.nextgenss.com/
+44(0)208 401 0070







--
E-MAIL DISCLAIMER

The information contained in this email and any subsequent
correspondence is private, is solely for the intended recipient(s) and
may contain confidential or privileged information. For those other than
the intended recipient(s), any disclosure, copying, distribution, or any
other action taken, or omitted to be taken, in reliance on such
information is prohibited and may be unlawful. If you are not the
intended recipient and have received this message in error, please
inform the sender and delete this mail and any attachments.

The views expressed in this email do not necessarily reflect NGS policy.
NGS accepts no liability or responsibility for any onward transmission
or use of emails and attachments having left the NGS domain.

NGS and NGSSoftware are trading names of Next Generation Security
Software Ltd. Registered office address: 52 Throwley Way, Sutton, SM1
4BF with Company Number 04225835 and VAT Number 783096402
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close