Skip to content

runtime: fix test_log_collector UAF#10056

Merged
ripatel-fd merged 1 commit into
mainfrom
ripatel/log-collector-uaf
Jun 3, 2026
Merged

runtime: fix test_log_collector UAF#10056
ripatel-fd merged 1 commit into
mainfrom
ripatel/log-collector-uaf

Conversation

@ripatel-fd

Copy link
Copy Markdown
Contributor

Replaces #10049

Copilot AI review requested due to automatic review settings June 3, 2026 16:17
@ripatel-fd ripatel-fd enabled auto-merge (rebase) June 3, 2026 16:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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] in test_log_messages_weird_behavior() that previously escaped via runtime->log.log_collector.
  • Use the existing runtime->log.log_collector pointer consistently across all test helpers.
  • Enable execution of test_log_collector via run-unit-test in Local.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.

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-406545575-perf per slot 0.090041 s 0.089876 s -0.183%
backtest mainnet-406545575-perf snapshot load 1.795 s 1.787 s -0.446%
backtest mainnet-406545575-perf total elapsed 90.041218 s 89.875773 s -0.184%
firedancer mem usage with mainnet.toml 1135.39 GiB 1135.39 GiB 0.000%

@ripatel-fd ripatel-fd merged commit d290340 into main Jun 3, 2026
18 checks passed
@ripatel-fd ripatel-fd deleted the ripatel/log-collector-uaf branch June 3, 2026 16: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.

4 participants