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

duphandle: make dupset() not return with pointers to old alloced data #12337

Closed
wants to merge 1 commit into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Nov 16, 2023

As the blob pointers are to be duplicated, the function must not return mid-function with lingering pointers to the old handle's allocated data, as that would lead to double-free in OOM situations.

Make sure to clear all destination pointers first to avoid this risk.

Yet another duphandle flaw discovered when working on #12319

As the blob pointers are to be duplicated, the function must not return
mid-function with lingering pointers to the old handle's allocated data,
as that would lead to double-free in OOM situations.

Make sure to clear all destination pointers first to avoid this risk.
@bagder bagder closed this in 54a385e Nov 16, 2023
@bagder bagder deleted the bagder/duphandle-blob-free branch November 16, 2023 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant