Skip to content

fix: Use Correct ptr Type to Avoid UAF#433

Merged
whoisj merged 4 commits intomainfrom
jwyman/fix-ptr-ownership
Mar 19, 2026
Merged

fix: Use Correct ptr Type to Avoid UAF#433
whoisj merged 4 commits intomainfrom
jwyman/fix-ptr-ownership

Conversation

@whoisj
Copy link
Contributor

@whoisj whoisj commented Mar 17, 2026

This change changes the managed pointer type used to manage the lifecyle of the stub instance from unique to shared. This avoids the dereference of the oft used unique pointer reference after the unique pointer has been free / deallocated.

CI Pipeline ID: 46362355

This change changes the managed pointer type used to manage the lifecyle of the stub instance from unique to shared.
This avoids the dereference of the oft used unique pointer reference after the unique pointer has been free / deallocated.
@whoisj whoisj requested a review from yinggeh March 17, 2026 18:23
@whoisj whoisj changed the title fix: Use Correct ptr Type fix: Use Correct ptr Type to Avoid UAF Mar 17, 2026
Adding a destroy instance function to stub to force invalidate the shared ptr.
@whoisj whoisj requested a review from yinggeh March 17, 2026 22:40
@yinggeh
Copy link
Contributor

yinggeh commented Mar 18, 2026

Copyrights

@whoisj
Copy link
Contributor Author

whoisj commented Mar 18, 2026

Copyrights

Good catch, thanks. Fixed up.

@whoisj whoisj requested a review from mudit-eng March 18, 2026 22:34
@whoisj whoisj merged commit 47f9e03 into main Mar 19, 2026
3 checks passed
@whoisj whoisj deleted the jwyman/fix-ptr-ownership branch March 19, 2026 15:42
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.

3 participants