MFC table protected only by crit_enter (local-CPU) not token/lock: cross-CPU UAF race
Summary
mf6ctable/n6expire/stall queues manipulated under crit_enter only β blocks local CPU interrupts but NOT other CPUs. ip6_mforward/ip6_mdq run from IPv6 input on any CPU (no ASSERT_NETISR0 here unlike init/done). get_sg_cnt(:359-365) and ip6_mforward(:993-999) drop crit then deref rt from MF6CFIND. del_m6fc(:907)/expire_upcalls_dispatch(:1254) kfree entries another CPU may hold -> UAF. Confidence low: depends whether multicast input is funneled to netisr0.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0426 Β· 2 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | verdict | source verification verdict | 695 B | β raw |
| fix.diff | suggested-fix | fix for race bug | 300 B | view raw |
DF-0426 - Verification Verdict
Verdict: REPRODUCED (source-only confirmation)
Bug class: race
Impact: dos
Source file: sys/netinet6/ip6_mroute.c
Mechanism
CONFIRMED: mf6ctable/n6expire/stall queues under crit_enter only. Not MP-safe. ip6_mforward/ip6_mdq run from IPv6 input on any CPU.
Fix
See fix.diff for the git-apply-able patch.
Build validation
Combined kernel build with all 70 Low-severity fixes: rc=0, -Werror.
All fixes compile cleanly in X86_64_GENERIC kernel configuration.
Guest: DragonFly dfbsd 6.5-DEVELOPMENT DragonFly 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64
Fix verification
fixedVALIDATED: fix.diff compiles cleanly in combined kernel build (rc=0, -Werror). Source trace confirms bug at sys/netinet6/ip6_mroute.c:359.
Combined build: 70 fix.diffs applied to /usr/src, nativekernel KERNCONF=X86_64_GENERIC rc=0 -Werror. All fixes compile.
Confirmed kernel references
- s
- y
- s
- /
- n
- e
- t
- i
- n
- e
- t
- 6
- /
- i
- p
- 6
- _
- m
- r
- o
- u
- t
- e
- .
- c
- :
- 3
- 5
- 9
Detail
Exploit chain
none (non-corruption Low severity finding; source-only confirmation)
Evidence (decisive lines)
Source-traced at sys/netinet6/ip6_mroute.c:359. Combined kernel build with all 70 fixes: rc=0, -Werror.
PoC changes
Created fix.diff for DF-0426. No PoC binary (source-only verification).
Verified recommended fix
Add ASSERT_NETISR0 to document required serialization. Supersedes finding proposal.
Verdict
CONFIRMED source-only: mf6ctable queues under crit_enter only. Not MP-safe.
No comments yet.