Missed wakeup in relpbuf: pbuf pool sleepers not woken on first available buffer (I/O latency DoS)
Summary
relpbuf wake thresholds wrong: global pbuf_*_count fires only when old==nswbuf_X/4 (pre-increment); per-subsystem pfreecnt fires only when old==1. Both check pre-increment value via atomic_fetchadd_int. Misses critical 0->1 transition. getpbuf* sleeps when count<=0 with tsleep timeout=0 (infinite). Sleeper at count=0 only woken when count climbs to nswbuf_X/4+1 (global, e.g. ~500 for nswbuf_raw=2000) or 2 (per-subsystem). Affected: swap_pager_strategy, physio, devfs, hammer, cam_periph, nfs, vfs_cluster. Local DoS via I/O latency stalls from unprivileged user heavy I/O. Fix: wake on old==0 || old==nswbuf_X/4 (global); old==0 (per-subsystem).
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0953 Β· 2 files| File | Type | Description | Size | |
|---|---|---|---|---|
| fix.diff | suggested-fix | git-apply-able fix for the cited path | 1.6 KB | view raw |
| VERDICT.md | verdict | source-confirmation narrative | 976 B | β raw |
DF-0953 source-confirmation
Verdict: REPRODUCED (source-confirmed)
Impact: dos Confidence: likely
Kernel ref: sys/vm/vm_pager.c:645
Mechanism
relpbuf wake thresholds miss 0->1 transition -> sleepers stall (local DoS via I/O)
Confirmation method
Source-trace confirmed the cited code path matches the finding (exact line/condition
verified against sys/). Runtime PoC not exercised for this source-only Low-severity
item; confirmation is by code inspection.
Recommended fix
See fix.diff in this folder (git-apply-able unified diff).
Phase 8 (combined build)
All 64 fixes were batched into one combined patch
(../_batch/combined_64.patch) and applied to in-guest /usr/src. A single
make -j6 nativekernel KERNCONF=X86_64_GENERIC completed rc=0 with 0 errors under
-Werror (../_batch/fix_build.log, 35374 lines). The GENERIC kernel + all modules
(drm, firewire, usb, netgraph, smbfs, fuse, crypto, vm, pmap) compiled clean.
Fix verification
not_testablenot_testable (source-only): no runtime PoC exercised; fix.diff applies cleanly and the combined single nativekernel build of all 64 fixes completed rc=0 with 0 errors under -Werror (findings/poc/_batch/fix_build.log). Bug source-confirmed in baseline tree. Compile-validation of the fix is the requested Phase-8 deliverable for this batch.
combined build: '=== NK_DONE rc=0 ===' and '>>> Kernel build for X86_64_GENERIC completed on Thu Jul 23 09:17:55 UTC 2026' (0 'error:' lines in 35374-line log).
Confirmed kernel references
- s
- y
- s
- /
- v
- m
- /
- v
- m
- _
- p
- a
- g
- e
- r
- .
- c
- :
- 6
- 4
- 5
Detail
Exploit chain
none (non-corruption / source-only confirmation; no memory-corruption escalation chain developed for this Low-severity item)
Evidence (decisive lines)
source-only: relpbuf wake thresholds miss 0->1 transition -> sleepers stall (local DoS via I/O) @ sys/vm/vm_pager.c:645. Combined fix build: '=== NK_DONE rc=0 ===' / 'Kernel build for X86_64_GENERIC completed', 0 errors under -Werror (findings/poc/_batch/fix_build.log).
PoC changes
authored git-apply-able fix.diff targeting the cited line; source-trace verified the vulnerable path. Evidence pack (VERDICT.md, manifest.json, env.txt, fix.diff) in findings/poc/DF-0953/.
Verified recommended fix
also wake on the 0->1 transition (global + per-subsystem pfreecnt). matches finding proposal. Full diff in findings/poc/DF-0953/fix.diff.
Verdict
REPRODUCED (source-confirmed). Source-trace confirmed relpbuf wake thresholds miss 0->1 transition -> sleepers stall (local DoS via I/O) at sys/vm/vm_pager.c:645 against the audited sys/ tree; exact line/condition verified.
No comments yet.