⬢ DragonFlyBSD Kernel Audit
DF-3220 / verdict.json
← back to finding ↓ download raw
{
 "finding_id": "DF-3220",
 "status": "not_reproduced",
 "reproduced": 0,
 "impact": "none",
 "confidence": "certain",
 "verdict": "DEAD CODE - closed per the DF-3058 precedent (dirfs absent from conf/files, unbuildable, mount_dirfs vkernel-only). Line-accurate confirmation: both early-error paths kfree(dmp) then goto failure which logs KTR_LOG(dirfs_mount, dmp->dm_path, ...) - a use-after-free read into the root-only ktr buffer (dirfs_vfsops.c:131/144/170); dirfs_roots dm_root!=NULL branch passes an unassigned error to KTR_LOG (:276); mp->mnt_data is set at :123 before validation and never cleared on the free paths. Fix: clear mnt_data before kfree, skip the post-free log, pass 0 explicitly.",
 "exploit_chain": "",
 "evidence": "VERDICT.md with path:line citations; run.log where a live demo exists; fix.diff",
 "kernel_refs": [
  "sys/vfs/dirfs/dirfs_vfsops.c:131",
  "sys/vfs/dirfs/dirfs_vfsops.c:144",
  "sys/vfs/dirfs/dirfs_vfsops.c:170",
  "sys/vfs/dirfs/dirfs_vfsops.c:276"
 ],
 "poc_changes": "n/a - dead code",
 "attempts": 0,
 "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",
 "runtime_sec": 30,
 "guest_dirty": 0,
 "build_cmd": "see build.sh",
 "run_cmd": "see run.sh",
 "code_hash": null,
 "notes": "",
 "recommended_fix": "zero mnt_data before kfree; log before freeing or skip; pass 0 to dirfs_root KTR",
 "fix_status": "not_testable",
 "fix_verdict": "dirfs is dead code in this tree (no Makefile, absent from conf/files, vkernel-only) - fix.diff authored but not compilable in any configuration"
}