⬢ DragonFlyBSD Kernel Audit
DF-2933 / verdict.json
← back to finding ↓ download raw
{
 "finding_id": "DF-2933",
 "status": "reproduced",
 "reproduced": 1,
 "impact": "none",
 "confidence": "certain",
 "verdict": "Mechanically reproduced via the harness on the stock guest with kbytes = 0x80001001 (2GiB+4097) and a valid 2-page kernel buffer: xio_init_kbuf returned 0 (success) with xio_bytes = -2147479551 (exactly 4096 + (int)0x80000001 twos-complement garbage) and npages=2 - the size_t kbytes -> int n truncation at kern_xio.c:121 wraps negative, the second iteration wraps kbytes to 2^32, xio_bytes overflows signed, and the n==0 exit dodges the error guard at :131. Distinct mechanism from DF-0160 (line :121 vs :113/:131, 2GiB threshold vs 128KiB, corrupts xio_bytes rather than truncating). Latent: zero in-tree callers (prototype-only API); downstream consumers treat negative xio_bytes as error (fail-safe). On the fix kernel the call returns EINVAL with xio_bytes untouched.",
 "exploit_chain": "",
 "evidence": "harness.log T11: ret=0 bytes=-2147479551; fix kernel T11: ret=22/EINVAL",
 "kernel_refs": [
  "sys/kern/kern_xio.c:121",
  "sys/kern/kern_xio.c:131"
 ],
 "poc_changes": "2 valid kernel pages suffice to drive the two-iteration wrap",
 "attempts": 1,
 "guest_uname": "DragonFly dfbsd 6.5-DEVELOPMENT #0: Thu Jul  2 06:02:54 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64",
 "runtime_sec": 25,
 "guest_dirty": 0,
 "build_cmd": "cd /root/h41 && make",
 "run_cmd": "kldload ./h41.ko; sysctl -w debug.h41.cmd=11",
 "code_hash": "85d6e241caa2a7fb1fb44b80c7736a4e83c36d29314b0c96ce91769bc9bdf839",
 "notes": "Third-party-KLD-reachable only; fail-safe downstream",
 "recommended_fix": "Reject kbytes > INT_MAX before the load loop",
 "fix_status": "fixed",
 "fix_baseline_reproduced": 1,
 "fix_patched_reproduced": 0,
 "fix_kernel_uname": "DragonFly dfbsd 6.5-DEVELOPMENT #1: Mon Oct 26 01:57:23 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64 (h41 fix kernel, all 41 hardening fixes applied)",
 "fix_verdict": "A/B: baseline returns success holding negative xio_bytes; fix kernel rejects kbytes > INT_MAX up front."
}