DragonFlyBSD Kernel Audit
DF-0929 / manifest.json
← back to finding ↓ download raw
{
  "finding_id": "DF-0929",
  "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",
  "code_hash": "b9a306d0f9e7f73e4c245b4cc038294a3be6c13dd327ab55b89b5a9764a94a47",
  "tested_at": "2026-07-22T18:10:00Z",
  "verdict": "REPRODUCED",
  "impact": "panic",
  "confidence": "certain",
  "reproduce": {
    "build": "./build.sh",
    "run": "./run.sh /root/evil.img /mnt/test",
    "expected": "kernel panic; see panic.txt / run.log. On a fixed kernel: exits 0, no panic."
  },
  "kernel_refs": [
    "sys/vfs/hammer/hammer_btree.c:728",
    "sys/vfs/hammer/hammer_btree.c:729",
    "sys/vfs/hammer/hammer_btree.c:736",
    "sys/vfs/hammer/hammer_btree.c:737",
    "sys/vfs/hammer/hammer_btree.c:764",
    "sys/vfs/hammer/hammer_dedup.c:60",
    "sys/vfs/hammer/hammer_dedup.c:66",
    "sys/vfs/hammer/hammer_dedup.c:92",
    "sys/vfs/hammer/hammer_dedup.c:111",
    "sys/vfs/hammer/hammer_dedup.c:117",
    "sys/vfs/hammer/hammer_dedup.c:134",
    "sys/vfs/hammer/hammer_dedup.c:153",
    "sys/vfs/hammer/hammer_ondisk.c:1142",
    "sys/vfs/hammer/hammer_ondisk.c:1156",
    "sys/vfs/hammer/hammer_blockmap.c:956",
    "sys/vfs/hammer/hammer_crc.h:260",
    "sys/vfs/hammer/hammer_crc.h:269",
    "sys/vfs/hammer/hammer_crc.h:293",
    "sys/vfs/hammer/hammer_disk.h:88",
    "sys/vfs/hammer/hammer_disk.h:934",
    "sys/vfs/hammer/hammer_ioctl.c:72",
    "sys/vfs/hammer/hammer_ioctl.h:443",
    "sys/vfs/hammer/hammer_ioctl.h:490",
    "sys/vfs/hammer/hammer_btree.h:175",
    "sys/sys/systm.h:118"
  ],
  "artifacts": [
    {
      "path": "trigger.c",
      "type": "trigger-source",
      "desc": "HAMMERIOC_DEDUP trigger with the correct ioctl number and struct (was a stub)."
    },
    {
      "path": "patch_image.py",
      "type": "trigger-source",
      "desc": "Host-side patcher: sets leaf->data_len=0x7FFFFFFF and data_crc=0 on two DATA leaves, recomputes B-Tree node CRC."
    },
    {
      "path": "build.sh",
      "type": "build-script",
      "desc": "cc -o trigger trigger.c"
    },
    {
      "path": "run.sh",
      "type": "run-script",
      "desc": "mounts evil.img and runs trigger against /mnt/test (root-only)."
    },
    {
      "path": "run.log",
      "type": "run-log",
      "desc": "baseline (#0) run narrative and panic trace from boot.log."
    },
    {
      "path": "fix_run.log",
      "type": "run-log",
      "desc": "patched (#1) run narrative; clean EIO return, guest stays up, dmesg shows the diagnostic."
    },
    {
      "path": "fix_build.log",
      "type": "build-log",
      "desc": "full make -j6 nativekernel output for the single-fix kernel (rc=0)."
    },
    {
      "path": "panic.txt",
      "type": "panic-signature",
      "desc": "panic: assertion 'data_len >= 0 && data_len <= HAMMER_XBUFSIZE' failed in hammer_btree_extract at hammer_btree.c:736."
    },
    {
      "path": "fix.diff",
      "type": "suggested-fix",
      "desc": "promotes the KKASSERT at hammer_btree.c:736 to an explicit bounds check returning EIO with a hdkprintf diagnostic; protects all hammer_btree_extract callers."
    },
    {
      "path": "env.txt",
      "type": "environment",
      "desc": "guest uname, cc version, runtime config."
    },
    {
      "path": "VERDICT.md",
      "type": "verdict",
      "desc": "full narrative: reproduced mechanism with path:line at each hop, fix validation before/after."
    },
    {
      "path": "README.md",
      "type": "readme",
      "desc": "original PoC README (seeded by orchestrator)."
    },
    {
      "path": "manifest.json",
      "type": "manifest",
      "desc": "this catalog."
    },
    {
      "path": "build.log",
      "type": "build-log",
      "desc": "kernel build log excerpt proving -Werror clean compile of patched source"
    },
    {
      "path": "fix_apply.log",
      "type": "apply-log",
      "desc": "patch --dry-run output proving fix.diff applies cleanly on with-src"
    },
    {
      "path": "../fix_build_combined.log",
      "type": "build-log",
      "desc": "Combined 41-finding kernel build (rc=0, -Werror clean)"
    },
    {
      "path": "../fix_build_summary.txt",
      "type": "build-summary",
      "desc": "Summary of the combined 41-finding kernel build"
    }
  ]
}