-
-
Notifications
You must be signed in to change notification settings - Fork 363
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 memory leaks in linux heap flow #4426
Conversation
Please review(one testcase failure) and lmk if we have to change this testcase output?
|
@giridharprasath There's something wrong with this test.
|
Interesting, |
if (tcache_guess < map->addr || tcache_guess > map->addr_end) { | ||
continue; | ||
} | ||
|
||
#if __aarch64__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, parsing should not depend on the architecture Rizin was built on.
rz_bin_import_free(reloc->import); | ||
rz_bin_symbol_free(reloc->symbol); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are not related to heap parsing and not tested well. Reloc related changes cause UAF and must be reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. @giridharprasath could you please send a PR reverting those? @pelijah do you have an example of the test file where it happens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
COFF files and some LE libs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was some reason why relocs refer to original imports/symbols. I have concerns that breaking this unwritten rule may cause side effects.
* Fix memory leaks in debug path * Fix memory leaks in mach and mdmp format * Update the fix for mach * Add support for aarch64 tcache parsing * Test case fix * Comment update --------- Co-authored-by: Giridhar Prasath R <[email protected]>
* Fix memory leaks in debug path * Fix memory leaks in mach and mdmp format * Update the fix for mach * Add support for aarch64 tcache parsing * Test case fix * Comment update --------- Co-authored-by: Giridhar Prasath R <[email protected]>
SQUASH ME
Your checklist for this pull request
Detailed description
Fix memory leak in
bin_elf
and fix a leak indmht
Add support for
aarch64
tcache parsing...
Test plan
Tested on ARM64 build
...
Closing issues
...