⬢ DragonFlyBSD Kernel Audit
DF-4787 / verdict.json
← back to finding ↓ download raw
{
  "finding_id": "DF-4787",
  "status": "untested",
  "reproduced": 0,
  "impact": "none",
  "confidence": "certain",
  "verdict": "dal_gpio_service_open() passes the create_ddc_data/create_ddc_clock/create_hpd() result straight into define_ddc_registers()/define_hpd_registers() before the !pin check; those factory helpers dereference pin (switch (pin->id) at hw_factory_dce110.c:116; hpd->regs write at :139), so a kzalloc failure inside dal_hw_ddc_create/dal_hw_hpd_create during display detect/hotplug under kernel memory pressure causes a deterministic NULL-deref panic. Not exercised on the audit guest because it contains no AMD GPU (pciconf in env.txt), so the bug class is hardware-gated and was verified by line-accurate code tracing only.",
  "exploit_chain": "",
  "evidence": "README.md (code cites), VERDICT.md (trace), env.txt (guest pci inventory: no vendor 0x1002 device), fix.diff (reorder + NULL guards)",
  "kernel_refs": [
    "sys/dev/drm/amd/display/dc/gpio/gpio_service.c:245",
    "sys/dev/drm/amd/display/dc/gpio/gpio_service.c:250",
    "sys/dev/drm/amd/display/dc/gpio/gpio_service.c:258",
    "sys/dev/drm/amd/display/dc/gpio/gpio_service.c:276",
    "sys/dev/drm/amd/display/dc/gpio/dce110/hw_factory_dce110.c:110",
    "sys/dev/drm/amd/display/dc/gpio/dce110/hw_factory_dce110.c:135",
    "sys/dev/drm/amd/display/dc/gpio/hw_ddc.c:224",
    "sys/dev/drm/amd/display/dc/gpio/hw_hpd.c:158"
  ],
  "poc_changes": "no runnable PoC produced: trigger requires AMD display hardware (kzalloc-failure DDC/HPD pin open); audit guest is virtio-only KVM",
  "attempts": 0,
  "guest_uname": "DragonFly dfbsd 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": 0,
  "guest_dirty": 0,
  "build_cmd": "",
  "run_cmd": "",
  "code_hash": "",
  "notes": "Same-function latent arm: .create_generic/.create_sync/.create_gsl are NULL on all four shipped families and are called unchecked (tracked as DF-4788). en-out-of-range arm unreachable today because all callers pass translate-table-bounded enums.",
  "recommended_fix": "Move define_ddc_registers/define_hpd_registers after the !pin check and NULL-check the create_* factory pointers (see fix.diff)",
  "fix_status": "not_testable",
  "fix_baseline_reproduced": 0,
  "fix_patched_reproduced": 0,
  "fix_verdict": "fix.diff is a mechanical reorder plus NULL guards (no new dereference sites); it cannot be boot-validated on the audit guest because the AMD DC stack never initializes there",
  "fix_evidence": "findings/poc/DF-4787/fix.diff"
}