Skip to content

Commit 54ec638

Browse files
committed
Improve parameter
1 parent c1022ab commit 54ec638

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

SecurityExploits/Chrome/v8/CVE-2021-37975/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The analysis of this bug can be found [here](https://securitylab.github.com/research/in_the_wild_chrome_cve_2021_37975). This is a Chrome bug that is reported by an anonymous researcher and was believed to be exploited in the wild.
44

5-
The exploit here is tested on `v8` version 9.4.146.16 (commit `452f57b`), which is the version shipped with Chrome 94.0.4606.71, the one before the bug is fixed, on Ubuntu 20.04. Tested on two different devices with different specs.
5+
The exploit here is tested on `v8` version 9.4.146.16 (commit `452f57b`), which is the version shipped with Chrome 94.0.4606.71, the one before the bug is fixed, on Ubuntu 20.04. Tested on two different desktop devices with different specs.
66

77
To test, check out `v8` at commit `452f57b` and compile with the default settings using `tools/dev/gm.py x64.release`. Then open the file `poc.js` with `d8`:
88

@@ -44,4 +44,4 @@ $
4444

4545
Shell code may need changing on other platforms.
4646

47-
The exploit is not reliable, (probably about 50 percent success rate). The variable `gcSize` may need changing depending on the device, and the variable `mapAddr` also depends on the version of v8 (it is an offset).
47+
The exploit is not reliable, (probably about 50 percent success rate). The variable `gcSize` may need changing depending on the device, and the variable `mapAddr` also depends on the version of v8 (it is an offset). Changing the variable `sprayParam` may also improve the reliability. The current parameter seems to give reasonable reliability across the two devices tested.

SecurityExploits/Chrome/v8/CVE-2021-37975/poc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ var initKey = {init : 1};
88
var level = 4;
99
var map1 = new WeakMap();
1010
var gcSize = 0x4fe00000;
11+
var sprayParam = 100;
1112

1213
//Get mapAddr using DebugPrint for double array (the compressed address of the map)
1314
var mapAddr = 0x8203ae1;
@@ -141,7 +142,7 @@ function main() {
141142

142143
let objArr = [];
143144

144-
for (let i = 0; i < 200; i++) {
145+
for (let i = 0; i < sprayParam; i++) {
145146
let thisArr = new Array(1 << 15);
146147
objArr.push(thisArr);
147148
}

0 commit comments

Comments
 (0)