2026-09-01 (Dedicated Stack Allocation & Seamless Register Restore Trampoline) (D312)
Architecture and Execution Refinement:
- Diagnosis:
- Rather than executing directly inside the host game thread's stack space (which could have unknown depth, non-standard alignment, or limited size), the injector must ensure a pristine, SysV AMD64 ABI compliant stack frame.
- Remediation:
- Dedicated 256KB Remote Stack
(
src/injector/injector.c):procctl_remote_mmapnow allocates0x40000bytes (256 KB) in the target address space. Offset 0 holdspayload_args, while the remaining space serves as a dedicated payload execution stack with guaranteed 16-byte alignment (RSP % 16 == 8at entry). - Full Register-Restore Trampoline
(
src/injector/injector.c): Staged a machine-code trampoline atstack_top + 0x80that restores all 16 AMD64 general-purpose registers (RAX,RBX,RCX,RDX,RSI,RDI,RBP,R8-R15,RSP), pushesbak_rip, and executesret. Whenobscene_startreturns, it jumps into this trampoline, cleanly handing execution back to the host game thread without leaving any side effects.
- Dedicated 256KB Remote Stack
(
Verified: make payload injector HARDWARE=1
(9,411,192 bytes) compiles 100% clean with zero warnings
and zero errors.