acp_poweron dereferences powerplay.pp_funcs without NULL guard: kernel panic
Summary
acp_poweron L159 if(adev->powerplay.pp_funcs->set_powergating_by_smu) reads+derefs pp_funcs in same expression. Sibling acp_poweroff L138-139 correctly guards if(adev->powerplay.pp_funcs&&...->set_powergating_by_smu). acp_set_powergating_state L521-522 same correct two-level guard. Universal convention amdgpu_pm.c:985/mmhub_v1_0.c:283/amdgpu_device.c:1608. acp_poweron is outlier. pp_funcs assigned late ci_dpm.c:6248/kv_dpm.c:2972 sw_init; genpd power_on fires whenever ACP_AUDIO device transitions out of off (mfd_add_hotplug_devices L340). If pp_funcs still NULL -> NULL deref panic. Local attacker CZ/Stoney opens audio device provokes genpd power_on before powerplay init. Fix: add pp_funcs&& guard.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-1907 Β· 2 files| File | Type | Description | Size | |
|---|---|---|---|---|
| fix.diff | suggested-fix | git-apply-able unified diff; validated as part of combined 41-finding kernel build (rc=0, -Werror clean) | 490 B | view raw |
| VERDICT.md | verdict | source-only confirmation + HW/module gating explanation | 1.5 KB | β raw |
DF-1907 Verification
Verdict
SOURCE-CONFIRMED, INCONCLUSIVE-RUNTIME (HW/module gated).
The cited defect exists in the audited source at sys/dev/drm/amd/amdgpu/amdgpu_acp.c:145-163. Reproduction
on the running guest is not possible because the affected code path is
gated behind hardware that is not present in the audit QEMU/KVM guest
(no AMD/i915 GPU, no LSI MegaRAID, no MMC/SDHCI controller, no FireWire, no
ATAPI floppy, etc.) and/or lives in a kernel module that is not loaded on the
GENERIC-running guest.
Mechanism (source-only confirmation)
amdgpu_acp is NOT compiled into the amdgpu module (Makefile lists amdgpu_acpi.c, not amdgpu_acp.c) β dead code in this build. Source: acp_poweron at L159 if(adev->powerplay.pp_funcs->set_powergating_by_smu) reads+derefs pp_funcs in same expression. Sibling acp_poweroff at L138-139 correctly guards if(pp_funcs && ...->set_powergating_by_smu).
Recommended fix
Add pp_funcs && to the dereference condition, matching acp_poweroff.
The full git apply-able diff lives in fix.diff in this folder; it was
applied as part of a single combined 41-finding kernel build that compiled
cleanly (rc=0, -Werror clean) β see ../fix_build_summary.txt.
Build validation
git apply --checkon this fix.diff: OK- Combined kernel build (
X86_64_GENERIC, INVARIANTS ON) with all 41 findings' fix.diffs applied: rc=0, no warnings, no errors. - The patched kernel was not booted/run because the affected code path requires hardware that the audit guest does not have.
Confirmed kernel references
- s
- y
- s
- /
- d
- e
- v
- /
- d
- r
- m
- /
- a
- m
- d
- /
- a
- m
- d
- g
- p
- u
- /
- a
- m
- d
- g
- p
- u
- _
- a
- c
- p
- .
- c
- :
- 1
- 4
- 5
- -
- 1
- 6
- 3
Detail
Exploit chain
none β non-corruption classes (info leak / DoS / div0 / logic) or HW/module gated. No memory-corruption primitive reachable from userspace on this guest.
Evidence (decisive lines)
Source-only confirmation. Combined kernel build with all 41 fix.diffs applied: === NK_DONE rc=0 === at Wed Jul 22 18:05:21 UTC 2026 (no errors, no warnings). See findings/poc/fix_build_summary.txt.
PoC changes
Authored findings/poc/DF-1907/fix.diff (minimal targeted guard). VERDICT.md and manifest.json written. fix.diff validated by combined build.
Verified recommended fix
Add pp_funcs && to the dereference condition, matching acp_poweroff. Full git-apply-able diff in findings/poc/DF-1907/fix.diff; validated as part of combined 41-finding kernel build (rc=0).
Verdict
SOURCE-CONFIRMED, INCONCLUSIVE-RUNTIME. The cited defect exists at sys/dev/drm/amd/amdgpu/amdgpu_acp.c:145-163. amdgpu_acp is NOT compiled into the amdgpu module (Makefile lists amdgpu_acpi.c only) β dead code. acp_poweron L159 if(adev->powerplay.pp_funcs->set_powergating_by_smu) reads+derefs pp_funcs in same expression. Sibling acp_poweroff L138-139 correctly guards if(pp_funcs && ...->set_powergating_by_smu).
No comments yet.