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

Non main heap arena fixes #392

Merged
merged 3 commits into from
Nov 16, 2018
Merged

Conversation

wbowling
Copy link
Contributor

@wbowling wbowling commented Nov 15, 2018

While doing a recent CTF I ran into a few issues when dealing a thread arena:

  • NON_MAIN_ARENA wasn't cleared from the chunk size
  • heap bin commands didn't work as (int(arena)&~0xFFFF) == (bk&~0xFFFF) was always true

This change is Reviewable

Copy link
Collaborator

@Grazfather Grazfather left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Validated it works, and validated that the test fails if i revert your actual fix.

Just one nitpick.

tests/runtests.py Outdated Show resolved Hide resolved
@Grazfather Grazfather merged commit 3840f43 into hugsy:dev Nov 16, 2018
daniellimws pushed a commit to daniellimws/gef that referenced this pull request Dec 9, 2018
* clear all of the malloc chunk flags
* fix up the check for empty bins to work with other arenas
* add a test for non-main areana
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.

2 participants