⬢ DragonFlyBSD Kernel Audit
DF-3025 / verdict.json
← back to finding ↓ download raw
{
 "finding_id": "DF-3025",
 "status": "not_reproduced",
 "reproduced": 0,
 "impact": "none",
 "confidence": "speculative",
 "verdict": "Setup to tn_links=32766 (LINK_MAX-1) succeeded, then two threads raced link() into two different directories across 200 + 600 rounds - first with a pthread barrier and a shared source path, then with distinct source hard-links (/L1 and /L993) to defeat namecache serialization. Every round came out complementary (errno pair 0/EMLINK or 31/0): exactly one link succeeded and the other got EMLINK, i.e. the tn_links check (tmpfs_vnops.c:1210) and the atomic_add in tmpfs_alloc_dirent (tmpfs_subr.c:320) never overlapped. The kernel-level serialization of both link() syscalls on the shared target vnode (vn_lock before VOP_NLINK) appears to make the window uncrossable from link(2) on this 6-vCPU guest; the source-level gap remains.",
 "exploit_chain": "",
 "evidence": "VERDICT.md + run.log + sources",
 "kernel_refs": [
  "sys/vfs/tmpfs/tmpfs_vnops.c:1209",
  "sys/vfs/tmpfs/tmpfs_subr.c:320"
 ],
 "poc_changes": "adjusted from finding sketch to guest syscall/layout reality",
 "attempts": 2,
 "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": 600,
 "guest_dirty": 0,
 "build_cmd": "guest: cc -O2 -o <bin> <src>.c -pthread",
 "run_cmd": "see README.md",
 "code_hash": "10d60e85e95f2a0e442f5e85b9b30ff40a67273b18731bcfdb3c2847f47daa05",
 "notes": "fix_status: not_testable (not reproduced)",
 "recommended_fix": "diff: TMPFS_NODE_LOCK(node) around the LINK_MAX check (or clamp+rollback in tmpfs_alloc_dirent).\n"
}