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 use after free in pyc due missing return while error handling #3823

Merged
merged 1 commit into from
Sep 3, 2023

Conversation

ifyGecko
Copy link
Contributor

@ifyGecko ifyGecko commented Sep 2, 2023

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 documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

Found a Use After Free bug in the pyc format code, if ret-> data is null we free ret but instead of returning we progress onward which will cause the now free'd ret to dereference its data field for the call to add_string_to cache.

@wargio
Copy link
Member

wargio commented Sep 3, 2023

Looks correct. nice find!

@wargio wargio changed the title fixed pyc uaf Use after free in pyc due missing return while error handling Sep 3, 2023
@wargio wargio changed the title Use after free in pyc due missing return while error handling Fix use after free in pyc due missing return while error handling Sep 3, 2023
@XVilka XVilka merged commit de938ba into rizinorg:dev Sep 3, 2023
43 checks passed
XVilka pushed a commit that referenced this pull request Sep 4, 2023
XVilka pushed a commit that referenced this pull request Sep 11, 2023
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.

3 participants