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 Safe-Linking (GLIBC >= 2.32) and malloc_state struct #878

Merged
merged 6 commits into from Oct 13, 2022
Merged

Fix Safe-Linking (GLIBC >= 2.32) and malloc_state struct #878

merged 6 commits into from Oct 13, 2022

Conversation

zhouzq-thu
Copy link
Contributor

Solve issue #877.

Copy link
Owner

@hugsy hugsy left a comment

Choose a reason for hiding this comment

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

Nice PR, some things to change though before merging.

Also it's missing CI tests.

gef.py Outdated Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
@hugsy hugsy linked an issue Aug 4, 2022 that may be closed by this pull request
@stale
Copy link

stale bot commented Oct 4, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. You can reopen it by adding a comment to this issue.

@stale stale bot added the stale label Oct 4, 2022
@hugsy
Copy link
Owner

hugsy commented Oct 8, 2022

Ping @zhouzq-thu ?

@stale stale bot removed the stale label Oct 8, 2022
@zhouzq-thu
Copy link
Contributor Author

@hugsy Changed

Copy link
Owner

@hugsy hugsy left a comment

Choose a reason for hiding this comment

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

One last change required (remove the entry in .gitignore) and we're good if tests pass

.gitignore Outdated
@@ -13,3 +13,5 @@ debug.log
.coverage
htmlcov
.benchmarks

.DS_Store
Copy link
Owner

Choose a reason for hiding this comment

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

Please remove, this is not specific to GEF (better to add it to your ~/.gitignore_global instead)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

previous_bin_address = arena.bin_at(index-1)
if previous_bin_address == fd:
return 0
if _type == "tcache":
Copy link
Owner

Choose a reason for hiding this comment

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

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we want specific cases such as GlibcTcacheChunk & GlibcFastChunk, it is required to modify the private attribute to be public.

Copy link
Owner

@hugsy hugsy left a comment

Choose a reason for hiding this comment

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

All good

@hugsy hugsy requested a review from theguy147 October 13, 2022 04:11
gef.py Show resolved Hide resolved
Copy link
Collaborator

@theguy147 theguy147 left a comment

Choose a reason for hiding this comment

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

nice and clean PR

@hugsy hugsy merged commit e9f3351 into hugsy:dev Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Safe-Linking is only used for fastbins and tcaches
3 participants