# DF-3004 - verification verdict

Status: **reproduced** | reproduced: 1 | impact: corruption | confidence: likely

Wrap reproduced and observable; the sync-panic sub-claim did NOT manifest in the canonical crafted case. Offline patch set the INODE records on-disk nlinks (hammer_inode_data+72) to 0 while the direntry still referenced it (CRC32C-verified matching, leaf data CRC + node CRC recomputed). On mount, stat exposed nlink=0 (no load-time validation); unlink decremented unconditionally (hammer_object.c:854) and fstat on a held fd showed nlink=4294967295 - the kernel-side UINT64_MAX wrap, userspace-visible, exactly the poisoned link count. However sync/synctid/umount completed WITHOUT the hammer_sync_inode KKASSERT((int64_t)nlinks >= 0) (hammer_inode.c:2980): analysis of the flush code shows the deleted-direntry dependency adjustment (++nlinks) re-wraps the count back to 0 before the assert comparison (sync_ino_data.nlinks == nlinks == 0), so the single-direntry crafted case does not panic; the assert would fire only for cross-flush-group record mixes. The 0-nlinks load and the unconditional wrap are the reproduced core. Fix (guarded decrement + underflow report) A/B validated on the fix-all kernel.

## Evidence pointers
df3004b_run.log: before unlink nlink=0; after unlink nlink=4294967295; after 3s flush pause nlink=4294967295; no panic; umount-ok

## Kernel references
- sys/vfs/hammer/hammer_object.c:854
- sys/vfs/hammer/hammer_inode.c:2980

## PoC changes vs the filing sketch
panic sub-claim refuted for the canonical case with mechanism analysis; open-fd fstat used to observe the wrap

## Fix
recommendation: guard the decrement + validate nlinks != 0 at hammer_get_inode load

fix status: fixed

A/B on fix-all kernel: same crafted image, fstat after unlink shows nlink=0 (no wrap) + underflow report

Guest: DragonFly dfbsd 6.5-DEVELOPMENT DragonFly 6.5-DEVELOPMENT #0: Thu Jul  2 06:02:04 UTC 2026     root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64

## Fix status (batch validation)
Applied with the 36 sibling fix.diffs of this batch in findings/poc/_batch41/all_fixes.patch; single in-guest `make -j6 nativekernel KERNCONF=X86_64_GENERIC` completed RC=0 with zero errors under -Werror (full log: findings/poc/_batch41/fix_build8.log). Behavior A/B intentionally skipped for this Info-tier item.
