⬢ DragonFlyBSD Kernel Audit
DF-2445 / verdict.json
← back to finding ↓ download raw
{
 "finding_id": "DF-2445",
 "status": "reproduced",
 "reproduced": 1,
 "impact": "leak",
 "confidence": "certain",
 "verdict": "REPRODUCED as root on the stock guest (kldload dm): DM create with a 130-char uuid succeeds, and the info ioctl reads back a 129-CHAR uuid - one byte more than the 128-char maximum a NUL-terminated uuid[129] store could ever return. The kernel-side prop_dictionary_set_cstring(DM_IOCTL_UUID, dmv->uuid) at dm_ioctl.c:414 performed the over-read to build that string. Termination today depends on unrelated struct padding; any field reordering or an all-non-zero neighbor turns this into a longer heap over-read into the status reply (root/operator-gated surface).",
 "exploit_chain": "no escalation path: /dev/mapper/control is 0640 root:operator; disclosure ceiling is heap bytes adjacent to uuid[] returned to the same privileged caller",
 "evidence": "run.log: create with 130-char uuid rc=0; info returns a 129-char uuid - one byte more than the 128-char maximum a NUL-terminated uuid[129] store can return",
 "kernel_refs": [
  "sys/dev/disk/dm/dm_dev.c:367",
  "sys/dev/disk/dm/dm.h:66",
  "sys/dev/disk/dm/dm_ioctl.c:414"
 ],
 "poc_changes": "Fixed during bring-up: added sys/ioctl.h + libprop/plistref.h includes (userland netbsd-dm.h needs ioccom and the plistref type), switched the readback to the info command (status maps to dm_dev_status_ioctl) and to prop_dictionary_sendrecv_ioctl with the reply out-param.",
 "attempts": 4,
 "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": 30,
 "guest_dirty": 0,
 "build_cmd": "cc -o dm_uuid_nterm dm_uuid_nterm.c -lprop",
 "run_cmd": "as root after kldload dm: ./dm_uuid_nterm",
 "code_hash": "754c52cfc24dd67d686ec263b58f94fd2b1261b19c2a302fbdb0eab941a5c2c3",
 "notes": "",
 "recommended_fix": "strlcpy instead of strncpy (name already uses strlcpy two lines above).",
 "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)"
}