DragonFlyBSD Kernel Audit
DF-0035 / manifest.json
← back to finding ↓ download raw
{
  "finding_id": "DF-0035",
  "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 + FIX VALIDATED",
  "impact": "panic (root-only OOB read via msgbuf_clear window; unprivileged path unreachable)",
  "confidence": "certain",
  "fix_status": "fixed",
  "reproduce": {
    "build": "./build.sh",
    "run_unprivileged": "./run.sh unprivileged",
    "run_decisive_root_only_panics_guest": "./run.sh decisive",
    "expected_unprivileged": "1.5M+ sysctl reads return no over-long / no non-text reads (RC=2). Bug is unreachable here.",
    "expected_decisive_on_unpatched": "kernel panic in std_copyout (trap 0xc) -- DECISIVE proof of the OOB read. Guest must be reset afterwards.",
    "expected_decisive_on_patched": "sysctl returns l=n bytes (in-bounds), rc=0, no panic, guest stays up.",
    "expected": "kernel panic; see panic.txt / run.log. On a fixed kernel: exits 0, no panic."
  },
  "kernel_refs": [
    "sys/kern/subr_prf.c:1177",
    "sys/kern/subr_prf.c:1181",
    "sys/kern/subr_prf.c:1183",
    "sys/kern/subr_prf.c:1056",
    "sys/kern/subr_prf.c:1067",
    "sys/kern/subr_prf.c:1213",
    "sys/kern/subr_prf.c:1214",
    "sys/kern/kern_sysctl.c:1197",
    "sys/kern/kern_sysctl.c:1321",
    "sys/kern/kern_sysctl.c:1337"
  ],
  "artifacts": [
    {
      "path": "msgbuf_oob.c",
      "type": "trigger-source",
      "desc": "original unprivileged kern.msgbuf poller (harmless)"
    },
    {
      "path": "msgbuf_diag.c",
      "type": "trigger-source",
      "desc": "sharper unprivileged diagnostic with detailed reporting"
    },
    {
      "path": "dump_msgbuf.c",
      "type": "diagnostic",
      "desc": "kvm(3)-based reader of msg_bufx/msg_bufr + branch-3 decision"
    },
    {
      "path": "msgbuf_oob_decisive.c",
      "type": "exploit-trigger",
      "desc": "DECISIVE root-only trigger: kvm_write bad geometry + sysctl read -> panic on #0"
    },
    {
      "path": "msgbuf_trigger.c",
      "type": "trigger-source",
      "desc": "earlier timing-based natural-path trigger (superseded by decisive)"
    },
    {
      "path": "msgbuf_brute.c",
      "type": "trigger-source",
      "desc": "root-only brute-forcer: 1-byte-step console writes + tight read loop"
    },
    {
      "path": "run_brute.sh",
      "type": "repro-script",
      "desc": "wrapper: arrange stale msg_bufr via msgbuf_clear, then brute-force"
    },
    {
      "path": "build.sh",
      "type": "build-script",
      "desc": "builds all five binaries"
    },
    {
      "path": "run.sh",
      "type": "run-script",
      "desc": "run.sh unprivileged | run.sh decisive"
    },
    {
      "path": "panic.txt",
      "type": "panic-signature",
      "desc": "tight panic signature from both decisive runs (proof)"
    },
    {
      "path": "baseline_panic.txt",
      "type": "panic-signature",
      "desc": "fresh baseline panic on #0 unpatched (2026-07-02 this session)"
    },
    {
      "path": "leak_sample.txt",
      "type": "leak-sample",
      "desc": "explanation of the panic signature and what it proves"
    },
    {
      "path": "run.unprivileged.log",
      "type": "run-log",
      "desc": "1.5M-read unprivileged poll on fresh boot: 0 hits"
    },
    {
      "path": "env.txt",
      "type": "environment",
      "desc": "uname, cc version, sysctls (unpatched #1 from prior session)"
    },
    {
      "path": "fix.diff",
      "type": "suggested-fix",
      "desc": "git-apply-able: n - rindex_modulo -> n in branch 3 (validated)"
    },
    {
      "path": "fix_build.log",
      "type": "build-log",
      "desc": "full nativekernel output for single-fix kernel (rc=0, 35602 lines)"
    },
    {
      "path": "fix_run.log",
      "type": "run-log",
      "desc": "decisive PoC on patched #1: returns l=n bytes, no panic"
    },
    {
      "path": "fix_run_unpriv.log",
      "type": "run-log",
      "desc": "unprivileged msgbuf_diag on patched #1: 0 OOB (sanity)"
    },
    {
      "path": "VERDICT.md",
      "type": "verdict",
      "desc": "full narrative: reproduced (root-only) + reachability + fix validation"
    },
    {
      "path": "README.md",
      "type": "readme",
      "desc": "human-facing readme with reproduce instructions"
    },
    {
      "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"
    }
  ]
}