Fix: free the filter string leaked by type_build_select - #3153
Merged
greenbonebot merged 1 commit intoSep 24, 2026
Merged
Conversation
greenbonebot
enabled auto-merge (rebase)
September 24, 2026 00:08
bjoernricks
approved these changes
Sep 24, 2026
bjoernricks
force-pushed
the
fix/84-leak-of-the-filter-string-in-type-build-select
branch
from
September 24, 2026 05:45
e428414 to
9323a66
Compare
greenbonebot
deleted the
fix/84-leak-of-the-filter-string-in-type-build-select
branch
September 24, 2026 05:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Free the
filterstring thattype_build_selectobtains fromfilter_term (get->filt_id)(orget->filter_replacement) in its cleanupblock, alongside the other allocations it releases.
Why
type_build_selectassignedfilterand then freed every other allocation inthe block but never that one, so each
get_aggregateswith afilt_idleakeda copy of the filter term.
Testing
Before the change, an authenticated
get_aggregateswith a filter idmade gvmd's stderr report a Direct leak of the filter term, allocated by
filter_termand abandoned bytype_build_select:The request is sent by a user that cannot resolve the filter, so the filter's
name is not fetched on the response path. After the change the same command
completes with no ASan report.