{
  "finding_id": "DF-0803",
  "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  (builds the deterministic arithmetic harness)",
    "run": "./run.sh  (harness + as-root vnconfig/mount_ext2fs of df0803_g0.img)",
    "expected": "kernel panic; see panic.txt / run.log. On a fixed kernel: exits 0, no panic."
  },
  "kernel_refs": [
    "sys/vfs/ext2fs/ext2_vfsops.c:594",
    "sys/vfs/ext2fs/ext2_vfsops.c:595",
    "sys/vfs/ext2fs/ext2_vfsops.c:620",
    "sys/vfs/ext2fs/ext2_vfsops.c:621",
    "sys/vfs/ext2fs/ext2_vfsops.c:622",
    "sys/vfs/ext2fs/ext2_vfsops.c:647",
    "sys/vfs/ext2fs/ext2_vfsops.c:649",
    "sys/vfs/ext2fs/ext2_vfsops.c:665",
    "sys/vfs/ext2fs/ext2_vfsops.c:679",
    "sys/vfs/ext2fs/ext2_vfsops.c:366",
    "sys/vfs/ext2fs/ext2_vfsops.c:379",
    "sys/vfs/ext2fs/ext2_vfsops.c:1338",
    "sys/vfs/ext2fs/ext2_vfsops.c:1358",
    "sys/vfs/ext2fs/ext2fs.h:159",
    "sys/vfs/ext2fs/ext2fs.h:175",
    "sys/vfs/ext2fs/ext2fs.h:248",
    "sys/vfs/ext2fs/fs.h:108",
    "sys/vfs/ext2fs/fs.h:111",
    "sys/kern/kern_slaballoc.c:193",
    "sys/kern/kern_slaballoc.c:888",
    "sys/sys/param.h:397"
  ],
  "artifacts": [
    {
      "path": "craft_img.py",
      "type": "trigger-source",
      "desc": "python superblock patcher; produces df0803_g{0,1,64}.img from an mke2fs base"
    },
    {
      "path": "harness.c",
      "type": "trigger-source",
      "desc": "deterministic userspace transcription of the kernel's e2fs_gcount arithmetic + downstream malloc/validate/deref flow"
    },
    {
      "path": "df0803_g0.img",
      "type": "crafted-image",
      "desc": "1 MB ext2 image, gcount wraps to 0 (howmany = 2^32) \u2014 panics on first inode deref"
    },
    {
      "path": "df0803_g1.img",
      "type": "crafted-image",
      "desc": "1 MB ext2 image, gcount wraps to 1 (howmany = 2^32 + 1) \u2014 mount succeeds, only GD[0] validated"
    },
    {
      "path": "build.sh",
      "type": "build-script",
      "desc": "cc -O2 -Wall -o harness harness.c"
    },
    {
      "path": "run.sh",
      "type": "run-script",
      "desc": "runs harness; if root, vnconfig+mount_ext2fs each crafted image"
    },
    {
      "path": "build.log",
      "type": "build-log",
      "desc": "harness build output on guest"
    },
    {
      "path": "run.log",
      "type": "run-log",
      "desc": "harness run output (deterministic arithmetic for all 4 variants)"
    },
    {
      "path": "panic.txt",
      "type": "panic-signature",
      "desc": "Fatal trap 12 in e2fs_gd_get_i_tables, fault addr 0x20 (baseline #0)"
    },
    {
      "path": "boot.log.baseline-confirm",
      "type": "boot-log",
      "desc": "raw serial log of the baseline re-confirmation run"
    },
    {
      "path": "boot.log.pre-df0803",
      "type": "boot-log",
      "desc": "raw serial log of the very first reproduction"
    },
    {
      "path": "boot.log.fix-test2",
      "type": "boot-log",
      "desc": "raw serial log of the patched-kernel #1 + patched-module test (no panic)"
    },
    {
      "path": "fix.diff",
      "type": "suggested-fix",
      "desc": "git apply-able: uint64 gcount + ext2_vget bounds check (supersedes finding proposal)"
    },
    {
      "path": "fix_build.log",
      "type": "build-log",
      "desc": "Phase 8 nativekernel build summary (rc=0, ~8 min)"
    },
    {
      "path": "fix_run.log",
      "type": "run-log",
      "desc": "Phase 8 validation: gcount=0/1 rejected with EINVAL, normal ext2 mounts OK"
    },
    {
      "path": "env.txt",
      "type": "environment",
      "desc": "guest uname, cc version, sysctls"
    },
    {
      "path": "VERDICT.md",
      "type": "verdict",
      "desc": "full narrative analysis: mechanism, impact, fix"
    },
    {
      "path": "README.md",
      "type": "readme",
      "desc": "human-readable reproduction guide"
    },
    {
      "path": "manifest.json",
      "type": "manifest",
      "desc": "this file"
    },
    {
      "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"
    }
  ]
}