DragonFlyBSD Kernel Audit
DF-3081 / verdict.json
← back to finding ↓ download raw
{
  "finding_id": "DF-3081",
  "status": "reproduced",
  "reproduced": 1,
  "impact": "leak",
  "confidence": "certain",
  "verdict": "procfs_readlink's Pfile case (vnops.c:1128-1162) and procfs_getattr's Pfile case (:642-665) return the full executable path of any process with no authorization gate — pt_valid is NULL for Pfile (:147-148), and the readlink path performs only pfs_pfind + p_ucred NULL check (no uid/CHECKIO/p_trespass/prison/showallprocs). Reproduced as uid 1001: readlink of /proc/1/file, /proc/390/file, /proc/466/file, /proc/68/file, /proc/710/file yields /sbin/init, /sbin/devd, /usr/sbin/syslogd, /sbin/hammer2, /usr/sbin/sshd. The in-tree comment at procfs_mem.c:212-219 admits this leak 'shouldn't happen'. Info-only impact: path disclosure of every binary on the system (more than ps reveals by default). Sibling of DF-0921 (map).",
  "exploit_chain": "",
  "evidence": ["run.log: readlink /proc/1/file -> /sbin/init; uid-0 sweep yields /sbin/dhclient, /sbin/devd, /usr/sbin/syslogd, /sbin/hammer2, /usr/sbin/sshd"],
  "kernel_refs": ["sys/vfs/procfs/procfs_vnops.c:147", "sys/vfs/procfs/procfs_vnops.c:642", "sys/vfs/procfs/procfs_vnops.c:1140", "sys/vfs/procfs/procfs_mem.c:212"],
  "poc_changes": "Written fresh; no seed existed.",
  "attempts": 1,
  "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": 1,
  "guest_dirty": 0,
  "build_cmd": "(shell script, no compile)",
  "run_cmd": "sh procfs_file_leak.sh",
  "code_hash": "50e67b16f7d9585e2f1231e4215cdc28479ad4512a0506a632f0a1bdeb197c4c",
  "notes": "kern.ps_argsopen=1 on this guest (operator choice exposes argv too); the Pfile leak has no knob at all.",
  "recommended_fix": "Gate Pfile readlink/getattr with CHECKIO+p_trespass (same policy as procfs_docmdline), falling back to 'unknown' for processes the caller may not examine.",
  "fix_status": "not_testable",
  "fix_kernel_uname": "",
  "fix_baseline_reproduced": 1,
  "fix_patched_reproduced": 0,
  "fix_verdict": "fix.diff authored against read-only sys/ tree; kernel not rebuilt (Low info-leak finding).",
  "fix_evidence": ["fix.diff"]
}