Skip to content
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

Open
rcombs opened this issue Mar 26, 2019 · 5 comments
Open

isExecutable check for PHDR placement adjustment isn't reliable #165

rcombs opened this issue Mar 26, 2019 · 5 comments
Labels

Comments

@rcombs
Copy link

rcombs commented Mar 26, 2019

See

if (isExecutable) {

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.

@rcombs
Copy link
Author

rcombs commented Mar 27, 2019

Actually, it looks like the #153 is already fixed in 63d0db9, so the impact of removing the isExecutable check altogether should be fairly minor at this point (barring other issues like #164).

@domenkozar
Copy link
Member

Since https://nixos.org/releases/patchelf/patchelf-0.10/ is out, this is fixed?

@rcombs
Copy link
Author

rcombs commented Mar 30, 2019

The issue persists in master. I'll be sending a PR with a few relevant changes shortly.

@ararslan
Copy link

ararslan commented Aug 9, 2019

Actually, it looks like the #153 is already fixed in 63d0db9

Is it? I opened #153 a year after that commit. 🤔

@domenkozar
Copy link
Member

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
Labels
Projects
None yet
Development

No branches or pull requests

3 participants