-
-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isExecutable check for PHDR placement adjustment isn't reliable #165
Labels
Comments
Since https://nixos.org/releases/patchelf/patchelf-0.10/ is out, this is fixed? |
The issue persists in master. I'll be sending a PR with a few relevant changes shortly. |
The PR is at #166 but it would be great if someone can reproduce this on master (and ideally attach a binary to this issue and describe how to reproduce). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See
patchelf/src/patchelf.cc
Line 745 in 6066239
This check is insufficient, as it only handles cases where the file has a PT_INTERP header, which means it won't run on static executables. Most static executables don't need to read AT_PHDR, but some do; e.g. static PIE executables.
This could alternately be handled by enforcing that PHDRs are always in the first page, which would also fix #153.
The text was updated successfully, but these errors were encountered: