This is a memory corruption bug found in Microsoft Internet Explorer. On IE 9,
it seems to only affect certain releases of mshtml.dll, ranging from a newly
installed IE9 (9.0.8112.16446), to 9.00.8112.16502 (July 2013 update). IE8
requires a different way to trigger the vulnerability, but not currently covered
by this module.
The issue is specific to the browser's IE7 document compatibility, which can be
defined in X-UA-Compatible, and the content editable mode must be enabled. An
"onmove" event handler is also necessary to be able to trigger the bug, and the
event will be run twice before the crash. The first time is due to the position
change of the body element, which is also when a MSHTML!CFlatMarkupPointer::`vftable'
object is created during a "SelectAll" command, and this object will be used later
on for the crash. The second onmove event seems to be triggered by a InsertButton
(or Insert-whatever) command, which is also responsible for the free of object
CFlatMarkupPointer during page rendering. The EnsureRecalcNotify() function will
then still return an invalid reference to CFlatMarkupPointer (stored in EBX), and
then passes this on to the next functions (GetLineInfo -> QIClassID). When this
reference arrives in function QIClassID, an access violation finally occurs when
the function is trying to call QueryInterface() with the bad reference, and this
results a crash. Successful control of the freed memory may leverage arbitrary code
execution under the context of the user.
Note: It is also possible to see a different object being freed and used, doesn't
always have to be CFlatMarkupPointer.
- sinn3r <firstname.lastname@example.org>