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

Potential Double Free Vulnerability #307

Closed
HoshinoStranding opened this issue Mar 26, 2024 · 1 comment · Fixed by #309
Closed

Potential Double Free Vulnerability #307

HoshinoStranding opened this issue Mar 26, 2024 · 1 comment · Fixed by #309

Comments

@HoshinoStranding
Copy link

HoshinoStranding commented Mar 26, 2024

I have identified a potential Double Free vulnerability in the project and would like to report it to the maintainers. This vulnerability has the potential to cause unexpected application behavior, crashes.Can you please help me check it? Thank you for your effort and patience!
Below is the execution sequence of the program that may produce Double Free vulnerability .

  1. clib/src/common/clib-package.c clib_package_new_from_slug_with_package_name function: On line 726, the variable "author" (a pointer to char) is freed for the first time. However, if the program goes to the "error" section on line 733, "author" may be freed again, which can lead to a Double Free vulnerability.

image

@r10nw7fd3
Copy link
Contributor

Hi! I'm not a maintainer, but if you need someone to take a fresh look I think I can put my five cents here.
This does, in fact, look like a double free. The chances of such double free are very low, however, because
most of the conditions to goto error are valid only if a call to malloc() in some other function is unsuccessful,
and while this can happen, it is quite rare.
But it is still a possible double free, so thank you for reporting it!

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 a pull request may close this issue.

2 participants