feat: add libc __exit_funcs utility class#2637
Closed
hannahfluch wants to merge 1 commit intoGallopsled:devfrom
Closed
feat: add libc __exit_funcs utility class#2637hannahfluch wants to merge 1 commit intoGallopsled:devfrom
__exit_funcs utility class#2637hannahfluch wants to merge 1 commit intoGallopsled:devfrom
Conversation
__exit_funcs utility class
Member
|
This will need updating after #2673 |
Contributor
|
I can implement this in #2673 @hannahfluch If you have no spare time to maintain this PR, I can do it. |
Contributor
Author
That would be amazing yes |
RocketMaDev
added a commit
to RocketMaDev/pwntools
that referenced
this pull request
Feb 20, 2026
RocketMaDev
added a commit
to RocketMaDev/pwntools
that referenced
this pull request
Feb 21, 2026
Member
|
Superceded by #2683 |
RocketMaDev
added a commit
to RocketMaDev/pwntools
that referenced
this pull request
Feb 25, 2026
RocketMaDev
added a commit
to RocketMaDev/pwntools
that referenced
this pull request
Apr 6, 2026
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.
closes #2633
Pwntools Pull Request
Thanks for contributing to Pwntools! Take a moment to look at
CONTRIBUTING.mdto make sure you're familiar with Pwntools development.Please provide a high-level explanation of what this pull request is for.
Adding a utility class for glibc's __exit_funcs. This can be helpful when promoting an arbitrary write and read to RCE.
See this resource for more info. A lot of exploits just use the CxaFunc and ExitHandler class shown here, so it would make sense to have the functionality in pwntools as well.
TODO
Testing
Pull Requests that introduce new code should try to add doctests for that code. See
TESTING.mdfor more information.Target Branch
Depending on what the PR is for, it needs to target a different branch.
You can always change the branch after you create the PR if it's against the wrong branch.
devdevstablestablebranchbetabetabranch, but notstabledevChangelog
After creating your Pull Request, please add and push a commit that updates the changelog for the appropriate branch.
You can look at the existing changelog for examples of how to do this.