⬢ DragonFlyBSD Kernel Audit
DF-3838 / verdict.json
← back to finding ↓ download raw
{
 "finding_id": "DF-3838",
 "status": "inconclusive",
 "reproduced": 0,
 "impact": "none",
 "confidence": "certain",
 "verdict": "Source-level certain, runtime inconclusive (no radeon GPU on the virtio-only guest; run.log shows ENOENT on /dev/dri/card0 and clean compile in build.log). The CB/DB SLICE registers are stored raw (:1208/:1416/:1425) and the validators compute nby = ((slice+1)*64)/nbx in u32 (:404/:571/:668): slice=0xffffffff wraps to nby=0, layer_size=0 and every offset>bo_size check (:442/:616/:635/:714/:730/:850/:910) then passes for any BO while the GPU honours SLICE_TILE_MAX=0x3fff and renders/samples far past the relocated BO. Same u32-truncation defeats layer_size*mslice products, the <<8 base-offset shifts (GPU addresses are 40-bit), the htile roundup(nbx*nby*4) product, and the streamout <<8/*4 stores made before the u64 check at :948-950. Identical class to DF-1340 (r600, High/memcorrupt) and DF-3765/3766 (r100); distinct from DF-1245 (pitch div0).",
 "exploit_chain": "",
 "evidence": "README.md (what to look at), VERDICT.md (line-by-line trace), trigger.c/mkbadfw.c, build.log (clean guest compile, gcc 8.3), run.log (honest ENOENT / generator RUN_OK), env.txt (guest has no DRI, no iwi NIC), fix.diff",
 "kernel_refs": [
  "sys/dev/drm/radeon/evergreen_cs.c:404",
  "sys/dev/drm/radeon/evergreen_cs.c:571",
  "sys/dev/drm/radeon/evergreen_cs.c:668",
  "sys/dev/drm/radeon/evergreen_cs.c:1416",
  "sys/dev/drm/radeon/evergreen_cs.c:1208",
  "sys/dev/drm/radeon/evergreen_cs.c:442",
  "sys/dev/drm/radeon/evergreen_cs.c:435",
  "sys/dev/drm/radeon/evergreen_cs.c:787",
  "sys/dev/drm/radeon/evergreen_cs.c:547",
  "sys/dev/drm/radeon/evergreen_cs.c:1278",
  "sys/dev/drm/radeon/evergreen_cs.c:1289",
  "sys/dev/drm/radeon/evergreen_cs.c:948"
 ],
 "poc_changes": "PoC authored fresh for this finding (cross-file family seed): raw DRM ioctl ABI (cmd low byte 0x66 dispatches RADEON_CS on DF drm_ioctl.c:809), chunk structs and packet encodings verified against sys/dev/drm/include/uapi/drm/radeon_drm.h; iwi mkbadfw.c emits the v3 combined-image header per if_iwireg.h:161-166.",
 "attempts": 1,
 "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",
 "runtime_sec": 30,
 "guest_dirty": 0,
 "build_cmd": "cc -O2 -o trigger trigger.c",
 "run_cmd": "./trigger /dev/dri/card0",
 "code_hash": "ef2247ea753d87f9a3a9854996fbabcb4a8e4fafb3cf920540011681b5fa3b33",
 "notes": "Hardware-gated: audit QEMU guest is virtio-only (no /dev/dri, hw.drm absent, no iwi PCI NIC) - runtime verification impossible in this environment; classification per orchestrator enum (no not_testable/skipped). Guest was NOT dirtied; no kernel rebuild performed (nothing reproduced to validate a fix against).",
 "recommended_fix": "Mask SLICE/PITCH registers to their HW fields, compute all surface sizes/offset products in 64-bit, store raw streamout values and widen at check time.",
 "fix_status": "not_applicable",
 "fix_baseline_reproduced": 0,
 "fix_patched_reproduced": 0,
 "fix_verdict": "Fix validation impossible on this guest: the vulnerable device (AMD radeon CS / Intel 2200BG) does not exist, so neither baseline nor patched kernel can exercise the path. fix.diff authored against the read-only sys/ tree, never applied.",
 "fix_evidence": "fix.diff in this pack; structurally mirrors the bounds checks the same driver family already enforces elsewhere (radeon_cs_packet_parse fit check; iwn ring-index masking)."
}