Repository navigation
fix analysisd: release owned hostname before ossecalert location alias - #2368
Merged
atomicturtle merged 1 commit intoOct 20, 2026
Conversation
Since ossec#1668, OS_CleanMSG_ex() can hand OSSECAlert_Decoder_Exec() an agent event whose hostname is a heap copy of the agent name with EF_FREE_HNAME set. The decoder then set lf->hostname = lf->location without clearing that ownership flag, so Free_Eventinfo() freed the same buffer twice and aborted analysisd. Free the owned hostname and clear EF_FREE_HNAME immediately before the alias. The existing ossec#1817 path then duplicates hostname on a full decode; early returns keep the unowned alias as before ossec#1668. Add issue_1668_ossecalert_hostname regression. Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-5ZOE8CQ9. Signed-off-by: Scott R. Shinn <scott@atomicorp.com>
atomicturtle
added a commit
to atomicturtle/ossec-hids
that referenced
this pull request
Oct 20, 2026
Keep clean targets for both the new date-oob objects and the ossecalert hostname objects from ossec#2368.
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.
Since #1668, OS_CleanMSG_ex() can hand OSSECAlert_Decoder_Exec() an agent event whose hostname is a heap copy of the agent name with EF_FREE_HNAME set. The decoder then set lf->hostname = lf->location without clearing that ownership flag, so Free_Eventinfo() freed the same buffer twice and aborted analysisd.
Free the owned hostname and clear EF_FREE_HNAME immediately before the alias. The existing #1817 path then duplicates hostname on a full decode; early returns keep the unowned alias as before #1668. Add issue_1668_ossecalert_hostname regression.
Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-5ZOE8CQ9.