<<< Date Index >>>     <<< Thread Index >>>

[HV-HIGH] MS Word multiple exceptions, at least one exploitable



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

MS Word multiple exceptions, at least one exploitable.

Classification:
===============
Level: low-MED-[high]-crit
ID: HEXVIEW*2004*10*06*1

Overview:
=========
MS Word is a highly overrated and widely used text processor, a part of
monstrous collection of applications and de-facto platform for virus and
worm replication known as MS Office suite.

Affected products:
==================
All tests were performed using MS Word 2002 (10.6612.6714) SP3 with all
the latest patches installed.

Cause and Effect:
=================
Sufficient data validation is not performed when winword.exe parses the
document file. As a result, it is possible to trigger an exception by
modifying data within *.doc file.

There are two exception types, one is triggered when winword.exe
tries to read from invalid memory region using offset value taken from the
document file. This exception is not exploitable.

The second exception is more interesting and most likely exploitable.
It is triggered by signed word->dword expansion that is later placed in
ECX, shifted right twice, and used as counter value for MOVSD instruction.
I.e. winword.exe code tried to copy nearly 4GB of RAM.

Demonstration:
==============
Below is a fragment of an empty *.doc file. Note the sequence of 0xAA characters
on line #3. When MS Word parsed this part of file, an exceptions occurs.
It is possible to trigger two other "access violation" conditions by modifying
data represented on lines #2 and #3.

00001400:  14 00 0F 00 12 00 01 00  9C 00 0F 00 03 00 00 00  ................
00001410:  00 00 00 00 00 00 40 00  00 40 F1 FF 02 00 40 00  ................
00001420:  AA AA AA AA AA AA AA AA  AA AA AA AA 4E 00 6F 00  ............N.o.
00001430:  72 00 6D 00 61 00 6C 00  00 00 02 00 00 00 18 00  r.m.a.l.........

Vendor Status:
==============
At the time of release vendor was not aware of the vulnerability.
HexView does not notify vendors unless there is a prior agreement to do so.
Vendors interested in receiving notifications prior to public disclosure or more detailed analysis may obtain more information by writing to the
e-mail address provided at the end of the document.

About HexView:
==============
HexView contributes to online security-related lists for almost a decade.
The scope of our expertize spreads over Windows, Linux, Sun, MacOS platforms,
network applications, and embedded devices. The chances are you read our
advisories or disclosures. For the sake of readability and easy web indexing
we recently decided to use the HexView alias to publish all the information.

Distribution:
=============
This document may be freely distributed through any channels as long as the
contents are kept unmodified. Commercial use of the information in the document
is not allowed without written permission from HexView signed by our pgp key.

Feedback and comments:
======================
Feedback and questions about this disclosure are welcome at vtalk@xxxxxxxxxxx

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBZIVgDPV1+KQrDqQRAnD0AJ9gKzuDc3Mcj2uAMMQo0yyilucKfwCgiJin
1B+gFEas1Kad7Mu1mvq5veA=
=cQ81
-----END PGP SIGNATURE-----