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

dns/client: fix rrlv reference cache handling #637

Merged
merged 1 commit into from
Jan 10, 2023
Merged

Conversation

sreimers
Copy link
Member

@sreimers sreimers commented Jan 9, 2023

It's not enough to reference rr for handle caching, since if the original query is derefed the rr->le_priv->list is derefed too. This can lead to heap-use-after-free crashes if list is accessed (like with list_unlink). This PR references the complete rrlv lists for caching.

Fixes baresip/retest#168

@sreimers sreimers marked this pull request as ready for review January 9, 2023 20:40
It's not enough to reference `rr` for handle caching, since
if the original query is derefed the rr->le_priv->list is derefed too.
This can lead to crashes. This PR references the complete rrlv lists for
caching.
@sreimers sreimers force-pushed the dns_client_fix_rrlv branch from 9e69ee5 to d0e501a Compare January 9, 2023 21:06
@sreimers sreimers merged commit 4d05098 into main Jan 10, 2023
@sreimers sreimers deleted the dns_client_fix_rrlv branch January 10, 2023 10:51
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.

Invalid write of size 8
1 participant