Repository navigation
Fix libRemoteInput-x86_64.so failing to load on glibc 2.41+ (executable stack) - #10
Open
thefriendlyhedgehog wants to merge 1 commit into
Open
thefriendlyhedgehog wants to merge 1 commit into
thefriendlyhedgehog wants to merge 1 commit into
Conversation
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.
thefriendlyhedgehog
force-pushed
the
fix-linux-noexecstack
branch
from
October 28, 2026 01:53
8b870c9 to
a235845
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On current Linux distros (glibc 2.41+) the x86_64 Linux build can't be loaded. Simba shows:
The real error from
dlopenis:The shipped
libRemoteInput-x86_64.sohasPT_GNU_STACKmarkedRWE. The aarch64 build isRW:The cause is
RemoteInput/Thirdparty/kubo_injector/src/linux/shellcode.S. It has no.note.GNU-stacksection, so the linker marks the whole library as needing an executable stack. glibc 2.41 stopped allowing that indlopen.This PR adds the standard note (guarded with
__ELF__). The shellcode gets injected into the target process and never runs from the stack, so the note doesn't change behaviour.Tested: the object built from the patched file now carries the note. Clearing the flag on the shipped
.somakes it load in Simba again, and pairing works.