Namecache reference leaked on every successful call (cache_drop never called)
Summary
Success path: nch copied from nd, nd zeroed(:86-87). cache_unlock(&nch)(:102) releases lock only. cache_drop never called (vfs_cache.c:1233 unlocks only, :1090 drops ref). Comment :130 confirms: leave ref intact. Slow unbounded leak of ncp+mount refs per call. Caller vn_opendisk receives only vnode not nch.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0254 Β· 5 files| File | Type | Description | Size | |
|---|---|---|---|---|
| fix.diff | suggested-fix | git-apply-able fix for DF-0254 | 320 B | view raw |
| VERDICT.md | verdict | source-confirmation + fix summary | 583 B | β raw |
| build.sh | build-log | combined-build validation note | 333 B | view raw |
| run.sh | run-log | source-only (no runtime PoC) | 128 B | view raw |
| env.txt | environment | guest uname + build env | 218 B | view raw |
DF-0254 -- Low
Verdict: REPRODUCED (source-confirmed)
REAL: success path caches nch then zeroes nd; cache_unlock(&nch) (line 102) releases the lock but cache_drop is never called, so the ncp+mount reference leaks on every call (slow unbounded leak).
Impact ceiling
none
Cited refs
Fix
Add cache_drop(&nch) after cache_unlock to release the leaked reference.
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/kern/vfs_synth.c:102 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
- /
- k
- e
- r
- n
- /
- v
- f
- s
- _
- s
- y
- n
- t
- h
- .
- c
- :
- 1
- 0
- 2
Detail
Exploit chain
none
Evidence (decisive lines)
baseline #0: bug at sys/kern/vfs_synth.c:102; combined-fix kernel 'NK_DONE rc=0' (0 errors,-Werror).
PoC changes
authored fix.diff (findings/poc/DF-0254/fix.diff); validated in the combined 60-finding kernel build.
Verified recommended fix
Add cache_drop(&nch) after cache_unlock to release the leaked reference. Full diff: findings/poc/DF-0254/fix.diff.
Verdict
REAL: success path caches nch then zeroes nd; cache_unlock(&nch) (line 102) releases the lock but cache_drop is never called, so the ncp+mount reference leaks on every call (slow unbounded leak).
No comments yet.