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 memory corruption in create_section_from_phdr #1313

Merged
merged 2 commits into from Jul 15, 2021

Conversation

08A
Copy link
Member

@08A 08A commented Jul 15, 2021

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the documentation and the rizin book with the relevant information (if needed)

Detailed description

  • fix the memory corruption => the vector push create a new section but the section->name could be a garbage value if section->offset is invalid.
  • fix some warning generated when there is no sections

Test plan

rizin POC.bin

POC.zip

Closing issues

...

@08A 08A requested review from thestr4ng3r and XVilka July 15, 2021 12:15
@08A 08A force-pushed the dist-asan-fix-memory-corruption branch 2 times, most recently from 7fd6ea4 to b401f49 Compare July 15, 2021 12:18
08A pushed a commit to 08A/rizin-testbins that referenced this pull request Jul 15, 2021
@08A 08A force-pushed the dist-asan-fix-memory-corruption branch from b401f49 to 60b69ce Compare July 15, 2021 16:58
@08A
Copy link
Member Author

08A commented Jul 15, 2021

+1 test waiting rizinorg/rizin-testbins#40

@08A 08A requested a review from wargio July 15, 2021 16:59
thestr4ng3r pushed a commit to rizinorg/rizin-testbins that referenced this pull request Jul 15, 2021
@08A 08A force-pushed the dist-asan-fix-memory-corruption branch from 60b69ce to 16826ed Compare July 15, 2021 17:43
@thestr4ng3r thestr4ng3r enabled auto-merge (rebase) July 15, 2021 17:49
@thestr4ng3r thestr4ng3r merged commit 432e4ba into dev Jul 15, 2021
40 of 41 checks passed
@thestr4ng3r thestr4ng3r deleted the dist-asan-fix-memory-corruption branch July 15, 2021 18:26
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

3 participants