⬢ DragonFlyBSD Kernel Audit
DF-2456 / verdict.json
← back to finding ↓ download raw
{
 "status": "reproduced",
 "reproduced": 1,
 "impact": "none",
 "confidence": "certain",
 "verdict": "Production fdcpio moved 1020 bytes for FD_FORMAT with nsecs=255 (b_bcount = 4*255 computed at fdformat:2272 with no clamp to FD_MAX_NSEC=36): the first 144 bytes are the legal idfields region; the remaining 876 bytes were read from past the fd_formb heap object (kmalloc canary 0x66 delivered to the FDC data port starting exactly at stream index 144). Control nsecs=36 moved exactly 144 bytes with 0 past the object. The bytes are captured byte-by-byte at the emulated FDC data port - on the FDC_NODMA (YE PCMCIA) path they are physically transmitted; the read-back channel makes this a heap info-disclosure.",
 "exploit_chain": "root FD_FORM(FWRITE) ioctl with nsecs up to 255 -> up to 876 bytes past the formb object streamed to the floppy as sector-ID data -> read the disk back to recover kernel heap contents",
 "evidence": "run.log (moved=1020, canary captured from index 144; control 144/0)",
 "kernel_refs": [
  "sys/dev/disk/fd/fd.c:2272",
  "sys/dev/disk/fd/fd.c:1905",
  "sys/platform/pc64/include/ioctl_fd.h:58"
 ],
 "poc_changes": "verbatim fd.c compiled into the rig (symbol renames only); production fdcpio transfer call with the production skip/bcount computation",
 "attempts": 1,
 "runtime_sec": 200,
 "guest_dirty": 0,
 "build_cmd": "see build.sh (dfhw.ko verbatim fd)",
 "run_cmd": "sysctl \"kern.dfhwgo=fd_form 255\" (control: fd_form 36)",
 "notes": "requires a floppy controller (FDC_NODMA path fully emulated; DMA path equivalent via isa_dmastart)",
 "recommended_fix": "clamp: if (finfo->fd_formb_nsecs == 0 || finfo->fd_formb_nsecs > FD_MAX_NSEC) return EINVAL; in the FD_FORM path",
 "finding_id": "DF-2456",
 "guest_uname": "DragonFly dfbsd 6.5-DEVELOPMENT DragonFly 6.5-DEVELOPMENT #0: Thu Jul  2 06:02:54 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64",
 "runner": "df-bsd-reviewer",
 "code_hash": "5006465cf0e2b3bea839147c22c7039ba3a621d6066201bd8dae5f9f4c7dac51"
}