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:

October 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close