runtime: fix test_log_collector UAF#10056
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a use-after-free in the test_log_collector unit test by preventing runtime->log.log_collector from being temporarily rebound to a function-local stack allocation, and enables the unit test to run as part of the hosted build’s unit test suite.
Changes:
- Remove the function-local
fd_log_collector_t log[1]intest_log_messages_weird_behavior()that previously escaped viaruntime->log.log_collector. - Use the existing
runtime->log.log_collectorpointer consistently across all test helpers. - Enable execution of
test_log_collectorviarun-unit-testinLocal.mk.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/flamenco/log_collector/test_log_collector.c | Stops rebinding runtime->log.log_collector to a stack-local object inside test_log_messages_weird_behavior(), eliminating the UAF. |
| src/flamenco/log_collector/Local.mk | Adds run-unit-test so test_log_collector is executed in hosted unit test runs. |
Performance Measurements ⏳
|
topointon-jump
approved these changes
Jun 3, 2026
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.
Replaces #10049