Repository navigation
Fix race condition in SecCompDispatcher startup - #42201
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the seccomp dispatcher startup-race fix.
No open issues 🎉
What changed in this PR
Fixes a startup race in the Linux seccomp dispatcher by delaying notification processing until all handlers are registered.
Changes:
- Adds an explicit
Start()method and calls it before running the port tracker. - Initializes the shutdown pipe before launching the worker and safely handles destruction without startup.
- Removes unused handler unregistration and adds assertions against registration after startup.
| File | Description |
|---|---|
src/linux/init/SecCompDispatcher.h |
Declares explicit startup and updates the worker interface. |
src/linux/init/SecCompDispatcher.cpp |
Separates construction from startup and adjusts shutdown handling. |
src/linux/init/localhost.cpp |
Starts the dispatcher after handler registration, before the port tracker runs. |
Review effort: Balanced
ggarzia-MSFT
approved these changes
Nov 6, 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.
Summary of the Pull Request
This change solves a race conditions during
SecCompDispatcher's startup: If a syscall is received before / while handlers are still being registeredm_handlerscan be accessed concurrently, and notifications can be missed.This change solves the issue by having a separate
Start()method that's called after all handlers are registered and removing the unused method to unregister callbacksPR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed