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

Fix ELF.libc_start_main_return with glibc 2.34 #2027

Merged
merged 2 commits into from
Jan 31, 2022

Conversation

peace-maker
Copy link
Member

The actual call to main was split out into a new __libc_start_call_main function in glibc 2.34 commit.

Update the heuristic to find main's return address by looking into all direct calls in __libc_start_main until the old heuristic matches.

The other direct calls could be e.g. atexit which doesn't call exit.

The actual call to `main` was split out into a new `__libc_start_call_main` function in glibc 2.34.

Update the heuristic to find main's return address by looking into all direct calls in `__libc_start_main` until the old heuristic matches.

The other direct calls could be e.g. `atexit` which doesn't call `exit`.
@Arusekk Arusekk merged commit 1fe9b3e into Gallopsled:dev Jan 31, 2022
@peace-maker peace-maker deleted the main_ret_glibc_2.34 branch January 31, 2022 17:47
gogo2464 pushed a commit to gogo2464/pwntools that referenced this pull request Sep 10, 2023
* Fix ELF.libc_start_main_return with glibc 2.34

The actual call to `main` was split out into a new `__libc_start_call_main` function in glibc 2.34.

Update the heuristic to find main's return address by looking into all direct calls in `__libc_start_main` until the old heuristic matches.

The other direct calls could be e.g. `atexit` which doesn't call `exit`.

* Update CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants