⬢ DragonFlyBSD Kernel Audit
DF-3647 / verdict.json
← back to finding ↓ download raw
{
  "finding_id": "DF-3647",
  "status": "inconclusive",
  "reproduced": 0,
  "impact": "none",
  "confidence": "certain",
  "verdict": "Source-certain div-by-zero, radeon/ci twin of DF-3612 (si) / DF-3621 (amdgpu ci). radeon_atombios_get_asic_ss_info() copies ss->rate straight from the VBIOS (radeon_atombios.c:1546, usSpreadRateInKhz) with no zero check and returns true on a matching entry. ci_calculate_mclk_params() then computes clks = reference_clock * 5 / ss.rate (ci_dpm.c:2876) and ci_calculate_sclk_params() computes clk_s = reference_clock * 5 / (reference_divider * ss.rate) (ci_dpm.c:3227). Both are u32 divisions; a zero rate raises #DE in kernel context -> panic. Reachable whenever caps_mclk_ss_support/caps_sclk_ss_support are set (they are set unconditionally when the ASIC_InternalSS_Info header parses, ci_dpm.c:5953-5957) and the SS assignment table contains a matching entry with rate==0 - trivially crafted. On-guest harness section [B] proved 100*5/0 faults with SIGFPE (userland analogue of #DE). Kernel path unreachable on this GPU-less guest, so overall inconclusive.",
  "exploit_chain": "Crafted VBIOS with an ASIC_InternalSS_Info assignment whose usSpreadRateInKhz is 0 and whose target-clock range covers the boot mclk/sclk -> u32 divide by zero -> kernel panic at DPM enable. DoS only. (Hardware-gated; harness proved the arithmetic fault.)",
  "evidence": "VERDICT.md (full source trace); harness.c + run.log/run.2.log section [B] (SIGFPE (kernel: #DE panic)); env.txt (guest has no AMD GPU: pciconf 0x1002 count=0, /dev/dri absent, no drm kld); fix.diff",
  "kernel_refs": [
    "sys/dev/drm/radeon/ci_dpm.c:2876",
    "sys/dev/drm/radeon/ci_dpm.c:3221",
    "sys/dev/drm/radeon/ci_dpm.c:3227",
    "sys/dev/drm/radeon/radeon_atombios.c:1546",
    "sys/dev/drm/radeon/ci_dpm.c:5953"
  ],
  "poc_changes": "n/a \u2014 no seeded PoC for pass-2; harness written fresh (models the exact kernel types; divisors made volatile so -O2 cannot fold the #DE)",
  "attempts": 2,
  "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": 45,
  "guest_dirty": 1,
  "build_cmd": "cc -O2 -Wall -o harness harness.c",
  "run_cmd": "./harness",
  "code_hash": "af83fc943c96cc840bab14bf99787f6e37c43ec42b624d998c2461cc2dad15f2",
  "notes": "pass 2 radeon/ci_dpm.c; twins: DF-3612/DF-3621. Guest virtio-only per task; harness scratch files under /root removed.",
  "recommended_fix": "Reject SS entries with rate == 0 (skip SS programming / return -EINVAL) in ci_calculate_mclk_params and ci_calculate_sclk_params.",
  "fix_status": "not_testable",
  "fix_baseline_reproduced": 0,
  "fix_patched_reproduced": 0,
  "fix_verdict": "Fix validation would require a CI-class GPU with a crafted VBIOS (baseline panic/corruption) and a single-fix kernel build; the audit guest is virtio-only, so the fix is source-reviewed only (fix.diff).",
  "fix_evidence": "fix.diff in this pack; not applied to sys/ (read-only audit target)."
}