⬢ DragonFlyBSD Kernel Audit
DF-2723 / verdict.json
← back to finding ↓ download raw
{
 "finding_id": "DF-2723",
 "status": "reproduced",
 "reproduced": 1,
 "impact": "denial_of_service",
 "confidence": "certain",
 "verdict": "REPRODUCED as root on the stock guest via /dev/ttyd0 (the sio console): sane {tv_sec=1,tv_nsec=0} returns ETIMEDOUT after 0.994 s; crafted {tv_sec=0, tv_nsec=2^62} computes (int)(2^62/1e7) = 1607101170 ticks (~186 days) and the fetch NEVER returns - the process had to be killed by timeout(1) at 40 s (exit 124), and the tsleep PCATCH/ERESTART cycle survives SIGALRM, so the sleep is effectively permanent. An attacker choosing the bit pattern chooses the tick count (including negative/0 variants). ttyd0 is 0600 root:wheel on this guest, so self-DoS of privileged callers.",
 "exploit_chain": "no escalation path: ttyd0 is 0600 root:wheel on this guest - privileged self-DoS (thread permanently hung in ppsfch)",
 "evidence": "run.log: sane {1,0} -> ETIMEDOUT after 0.994 s; crafted {0, 2^62} -> still sleeping at 40 s, killed by timeout(1) (exit 124); (int)(2^62/1e7)=1607101170 ticks = ~186 days",
 "kernel_refs": [
  "sys/kern/kern_clock.c:1618",
  "sys/kern/kern_clock.c:1265",
  "sys/kern/kern_clock.c:1643",
  "sys/dev/serial/sio/sio.c:2165"
 ],
 "poc_changes": "Rebuilt around /dev/ttyd0 (sio console): every unrecognized tty ioctl reaches pps_ioctl via the sio default case; added explicit timing, alarm guard and timeout(1) because the crafted sleep outlives SIGALRM (ERESTART re-enters tsleep).",
 "attempts": 3,
 "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": 120,
 "guest_dirty": 0,
 "build_cmd": "cc -o pps_fetch_timeout pps_fetch_timeout.c",
 "run_cmd": "run under timeout: timeout 40 ./pps_fetch_timeout  (as root)",
 "code_hash": "4d0dc0578151a3414a6445b4c8776a0fd5ff195ab0b763925d681a8f84a6737e",
 "notes": "",
 "recommended_fix": "Validate/normalize timeout (reject tv_nsec<0 or >=1000000000) in the PPS_IOC_FETCH handler before calling pps_fetch_timeout.",
 "fix_status": "not_testable",
 "fix_kernel_uname": null,
 "fix_baseline_reproduced": null,
 "fix_patched_reproduced": null,
 "fix_verdict": "fix.diff compile-validated in the batch combined kernel build (all 37 diffs of this batch applied to in-guest /usr/src; make -j6 nativekernel KERNCONF=X86_64_GENERIC, see batch build log referenced in VERDICT.md); no behavior A/B performed for this Info-tier item; behavior A/B intentionally skipped for Info tier",
 "fix_evidence": "batch combined kernel build log (see findings/poc/_batch41 note in VERDICT.md)"
}