โฌข DragonFlyBSD Kernel Audit
DF-5205 / verdict.json
โ† back to finding โ†“ download raw
{
  "finding_id": "DF-5205",
  "status": "untested",
  "reproduced": false,
  "impact": "none",
  "confidence": "certain",
  "verdict": "Static fail-open proven at sys/dev/drm/radeon/trinity_smc.c:43-53: trinity_notify_message_to_smu() returns success for an SMC timeout (v==0 after 100ms) and every undefined response code outside exactly 0xFF/0xFE, and unlike the kv twin (DF-5137) it reads SMC_RESP_0 unmasked so stray upper bits also defeat validation; the whole trinity_dpm state machine then believes PM reconfigurations that never happened. Runtime demonstration requires AMD Trinity hardware with a wedged SMC โ€” absent from the audit QEMU guest โ€” and as an Info-class hardening finding with no attacker-controlled input it is outside the Phase V mandate, so no PoC was authored or run.",
  "exploit_chain": "",
  "evidence": "analysis.txt (annotated line-by-line walkthrough); fix.diff (catch-all -EINVAL, git apply --check clean); decisive lines trinity_smc.c:36-40 (timeout fall-through), :41 (unmasked RREG32), :43-53 (only 0xFF/0xFE handled, everything else returns 0); consumer proof trinity_dpm.c:1105-1132 (trinity_dpm_enable returns 0 unconditionally at :1131); register defs trinityd.h:169-170; timeout radeon.h:131",
  "kernel_refs": ["sys/dev/drm/radeon/trinity_smc.c:36", "sys/dev/drm/radeon/trinity_smc.c:41", "sys/dev/drm/radeon/trinity_smc.c:43", "sys/dev/drm/radeon/trinity_smc.c:53", "sys/dev/drm/radeon/trinity_dpm.c:1105", "sys/dev/drm/radeon/trinity_dpm.c:1131", "sys/dev/drm/radeon/trinityd.h:170", "sys/dev/drm/radeon/radeon.h:131"],
  "poc_changes": "No PoC authored: the defect is only reachable on AMD Trinity (HD 7xxx APU) ASICs via the radeon DPM path; the QEMU audit guest has no radeon GPU and there is no software-only trigger (message ids are compile-time constants). Static proof + fix.diff shipped instead.",
  "attempts": 0,
  "guest_uname": "",
  "runtime_sec": 0,
  "guest_dirty": 0,
  "build_cmd": "",
  "run_cmd": "",
  "code_hash": "cd7fe5bdd56dd21ddea37c599eae6058663e15dddab80bfc8dda21103d710a5f",
  "notes": "Radeon twin of DF-5137 (kv_smc.c) / DF-5132 (amdgpu kv_smc.c); trinity is the only family member with an UNMASKED response read (no SMC_RESP_MASK exists for TN โ€” cikd.h:431 is CIK-only). Reliability fail-open, no memory-safety primitive, no unprivileged input on the path.",
  "recommended_fix": "Add a catch-all error return in trinity_notify_message_to_smu() for every v != 1 that is not the two defined SMC error codes (see fix.diff).",
  "fix_status": "not_testable",
  "fix_baseline_reproduced": 0,
  "fix_patched_reproduced": 0,
  "fix_verdict": "fix.diff authored against the read-only sys/ tree and verified with git apply --check; single-hunk, no semantic conflicts. Cannot be hardware-validated: baseline cannot be reproduced without Trinity ASICs, so fix_status is not_testable rather than fixed.",
  "fix_evidence": "fix.diff in this directory; applied and reverted with git apply --check on sys/dev/drm/radeon/trinity_smc.c (clean); hunk touches lines 48-53 only."
}