DragonFlyBSD Kernel Audit
DF-0117 / manifest.json
← back to finding ↓ download raw
{
  "finding_id": "DF-0117",
  "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": "pkill -9 -x hammer2; ./trigger_race 131072 0 0 1",
    "expected": "kernel panic; see panic.txt / run.log. On a fixed kernel: exits 0, no panic."
  },
  "kernel_refs": [
    "sys/kern/subr_diskiocom.c:372",
    "sys/kern/subr_diskiocom.c:375",
    "sys/kern/subr_diskiocom.c:381",
    "sys/kern/subr_diskiocom.c:384",
    "sys/kern/subr_diskiocom.c:390",
    "sys/kern/subr_diskiocom.c:577",
    "sys/kern/subr_diskiocom.c:580",
    "sys/kern/subr_diskiocom.c:582",
    "sys/kern/subr_diskiocom.c:650",
    "sys/kern/subr_diskiocom.c:661",
    "sys/kern/kern_dmsg.c:1077",
    "sys/kern/kern_dmsg.c:1291",
    "sys/kern/kern_dmsg.c:1647",
    "sys/kern/kern_dmsg.c:1672",
    "sys/kern/kern_dmsg.c:1704",
    "sys/kern/kern_dmsg.c:1822",
    "sys/kern/kern_dmsg.c:1974",
    "sys/kern/kern_dmsg.c:2036"
  ],
  "artifacts": [
    {
      "path": "trigger_race.c",
      "type": "trigger-source",
      "desc": "self-contained UAF trigger: DIOCRECLUSTER + BLK_READ|CREATE(MAXPHYS) + immediate socket-close teardown race"
    },
    {
      "path": "trigger.c",
      "type": "trigger-source",
      "desc": "prior trigger (many separate states, one I/O each \u2014 did not reproduce; kept for reference)"
    },
    {
      "path": "build.sh",
      "type": "build-script",
      "desc": "cc -O2 -o trigger trigger.c -lpthread + race variant"
    },
    {
      "path": "run.sh",
      "type": "run-script",
      "desc": "kills hammer2, runs trigger_race 131072 0 0 1"
    },
    {
      "path": "fix.diff",
      "type": "suggested-fix",
      "desc": "git-apply-able fix: defer DELETE reply to diskiodone when iost->count > 0 (set eof=1 instead of kdmsg_msg_reply)"
    },
    {
      "path": "panic.txt",
      "type": "panic-signature",
      "desc": "fatal trap / panic: assertion pstate != NULL in kdmsg_msg_alloc from diskiodone+0x120 via vtblk_vq_intr"
    },
    {
      "path": "run.log",
      "type": "run-log",
      "desc": "baseline run on unpatched #0 kernel \u2014 SSH timeout, guest panicked"
    },
    {
      "path": "fix_run.log",
      "type": "run-log",
      "desc": "patched #1 kernel run \u2014 clean exit 0, blk_active 0, guest up, stress tests all pass"
    },
    {
      "path": "fix_build.log",
      "type": "build-log",
      "desc": "patched kernel build output (NK_DONE rc=0)"
    },
    {
      "path": "env.txt",
      "type": "environment",
      "desc": "guest uname, cc version, sysctl state"
    },
    {
      "path": "VERDICT.md",
      "type": "verdict",
      "desc": "full narrative: mechanism trace, prior-verdict gap analysis, fix validation"
    },
    {
      "path": "README.md",
      "type": "readme",
      "desc": "human-facing build/run/expected summary"
    },
    {
      "path": "manifest.json",
      "type": "manifest",
      "desc": "this file"
    },
    {
      "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"
    }
  ]
}