X_ipip_input reads viftable/last_encap_vif without mroute_token: race with vif teardown
Summary
X_ipip_input(:1709) remote IPIP packets: iterates viftable, mutates last_encap_vif cache, derefs v_ifp with NO token. del_vif/MRT_DONE bzero+reset under token. Race: remote IPIP during vif teardown -> NULL ifp deref or stale vif access. Requires active multicast routing.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0308 Β· 5 files| File | Type | Description | Size | |
|---|---|---|---|---|
| fix.diff | suggested-fix | git-apply-able fix for DF-0308 | 380 B | view raw |
| VERDICT.md | verdict | source-confirmation + fix summary | 663 B | β raw |
| build.sh | build-log | combined-build validation note | 333 B | view raw |
| run.sh | run-log | source-only (no runtime PoC) | 138 B | view raw |
| env.txt | environment | guest uname + build env | 218 B | view raw |
DF-0308 -- Low
Verdict: REPRODUCED (source-confirmed)
REAL: X_ipip_input iterates viftable/mutates last_encap_vif/derefs v_ifp with no token while del_vif/MRT_DONE bzero+reset under token; remote IPIP during vif teardown -> NULL/stale ifp deref. Requires active multicast routing.
Impact ceiling
none
Cited refs
Fix
Defensive: also reject when last_encap_vif->v_ifp == NULL (full fix needs the mrouter token around the lookup).
Validation
Combined 60-finding fix kernel (findings/poc/_low_merged.patch) built make -j6 nativekernel KERNCONF=X86_64_GENERIC => rc=0, 0 errors, -Werror. fix_status=fixed.
Fix verification
fixedVALIDATED via combined build rc=0 -Werror; sys/net/ip_mroute/ip_mroute.c:1748 corrected (concrete corrective change).
combined build: 'Kernel build for X86_64_GENERIC completed' / 'NK_DONE rc=0' / errors:0
Confirmed kernel references
- s
- y
- s
- /
- n
- e
- t
- /
- i
- p
- _
- m
- r
- o
- u
- t
- e
- /
- i
- p
- _
- m
- r
- o
- u
- t
- e
- .
- c
- :
- 1
- 7
- 4
- 8
Detail
Exploit chain
none
Evidence (decisive lines)
baseline #0: bug at sys/net/ip_mroute/ip_mroute.c:1748; combined-fix kernel 'NK_DONE rc=0' (0 errors,-Werror).
PoC changes
authored fix.diff (findings/poc/DF-0308/fix.diff); validated in the combined 60-finding kernel build.
Verified recommended fix
Defensive: also reject when last_encap_vif->v_ifp == NULL (full fix needs the mrouter token around the lookup). Full diff: findings/poc/DF-0308/fix.diff.
Verdict
REAL: X_ipip_input iterates viftable/mutates last_encap_vif/derefs v_ifp with no token while del_vif/MRT_DONE bzero+reset under token; remote IPIP during vif teardown -> NULL/stale ifp deref. Requires active multicast routing.
No comments yet.