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

Fix phdr loading for linux binaries #8796

Merged
merged 1 commit into from Nov 7, 2017

Conversation

Projects
None yet
3 participants
@XVilka
Copy link
Collaborator

XVilka commented Nov 6, 2017

There is an interesting case of the incorrect loading ELF files in Linux systems, starting from 2005 year.
Basically it uses phdr offset not from the original physical image offset, but in the loaded, already segmented image (after parsing phdr initially). Please review and discuss. Note, I don't know if other *nix systems do the same, it seems only Linux-specific behavior.

@XVilka XVilka requested review from crowell , radare , alvarofe and jpenalbae Nov 6, 2017

@Maijin

This comment has been minimized.

Copy link
Collaborator

Maijin commented Nov 6, 2017

Wait the testsuite on this before merging, there was some work on this by @alvarofe who probably wants to review

@XVilka XVilka force-pushed the XVilka:elfix branch 5 times, most recently from 8143a9d to 161498c Nov 6, 2017

@XVilka

This comment has been minimized.

Copy link
Collaborator

XVilka commented Nov 7, 2017

Here is the writeup about this kind of trick: https://gist.github.com/pzread/2ae0bb3aa5fe0dc69fcf3257c41db944

@XVilka XVilka referenced this pull request Nov 7, 2017

Merged

Add ELF PHDR trick test #1066

@XVilka

This comment has been minimized.

Copy link
Collaborator

XVilka commented Nov 7, 2017

Now the only one test fails, which fails also in master - filesystem one.

@XVilka XVilka force-pushed the XVilka:elfix branch from 161498c to dd09c92 Nov 7, 2017

@radare

This comment has been minimized.

Copy link
Owner

radare commented Nov 7, 2017

@XVilka XVilka merged commit bb406e2 into radare:master Nov 7, 2017

0 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment