Repository navigation
[Nexthop][bugfix] Drain in-flight event sinks before warm and cold boot exit to fix FDB UAF - #1668
Open
maisey-nexthop wants to merge 2 commits into
Open
maisey-nexthop wants to merge 2 commits into
maisey-nexthop wants to merge 2 commits into
Conversation
maisey-nexthop
force-pushed
the
maisey.thrift-shutdown-fix
branch
from
October 13, 2026 23:01
0756864 to
5f4f443
Compare
maisey-nexthop
marked this pull request as ready for review
October 13, 2026 23:44
maisey-nexthop
force-pushed
the
maisey.thrift-shutdown-fix
branch
2 times, most recently
from
November 4, 2026 17:49
b239831 to
5096189
Compare
…to fix FDB UAF Signed-off-by: maisey-nexthop <maisey@nexthop.ai>
exitForColdBoot() only requested cancellation of the hw agent event sinks before SwSwitch::stop(), which resets macTableManager_. An FDB event still being delivered by co_notifyFdbEvent could then call l2LearningUpdateReceived() on a null MacTableManager and SIGSEGV. Wait for the sinks to drain after cancelling, as handleExitSignal() now does. Signed-off-by: maisey-nexthop <maisey@nexthop.ai>
maisey-nexthop
force-pushed
the
maisey.thrift-shutdown-fix
branch
from
November 4, 2026 18:52
5096189 to
25620fd
Compare
This branch has not been deployed
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.
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
Drain active hw-agent event sinks before SwSwitch teardown. Cancellation alone does not wait for callbacks already processing events. Track active sinks, reject new ones during shutdown, and wait before graceful or cold-boot teardown.
The drain waits up to 5 seconds. On timeout, it logs the active sink count and continues shutdown.
Test Plan
Benchmark tests pass consistently.
Ran the
memory_scale_benchmarkssuite on a TH6 unit with the cold-boot drain applied:SystemScaleChurnMemoryBenchmarkandSystemScaleMemoryBenchmarkboth complete, with no rc -11 and no event syncer drain timeouts. Without the change, the churn benchmark exited with rc -11 inMacTableManager::handleL2LearningUpdate.