From a2358451523f1c15beda72642448118b0837b34d Mon Sep 17 00:00:00 2001 From: thefriendlyhedgehog Date: Tue, 27 Oct 2026 21:52:33 -0400 Subject: [PATCH] Mark kubo_injector shellcode as not needing an executable stack. shellcode.S has no .note.GNU-stack section. Linkers that default to an executable stack for unmarked objects (as the x86_64 Linux CI build does) therefore mark the whole libRemoteInput-x86_64.so PT_GNU_STACK RWE. Since glibc 2.41, dlopen refuses to load a library that requests an executable stack: "cannot enable executable stack as shared object requires". Simba reports this as "Loading plugin failed. Architecture mismatch?", so the plugin cannot be loaded at all on current distros. The shellcode is injected into the target process, never executed on the stack, so the note is safe. Guarded with __ELF__ so non-ELF assemblers are unaffected. --- RemoteInput/Thirdparty/kubo_injector/src/linux/shellcode.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RemoteInput/Thirdparty/kubo_injector/src/linux/shellcode.S b/RemoteInput/Thirdparty/kubo_injector/src/linux/shellcode.S index 6704606a..4b0d28a3 100644 --- a/RemoteInput/Thirdparty/kubo_injector/src/linux/shellcode.S +++ b/RemoteInput/Thirdparty/kubo_injector/src/linux/shellcode.S @@ -68,3 +68,7 @@ injector_shellcode_size: // distance from injector_shellcode to current. .int . - injector_shellcode #endif + +#if defined(__ELF__) +.section .note.GNU-stack,"",@progbits +#endif