Integer underflow sends 0xFFFFFFFF PCIe DPM level to SMC firmware
Summary
smu7_force_clock_level at :4384-4393: tmp=mask&pcie_dpm_enable_mask. If tmp==0: fls(0)=0, ffs(0)=0, inequality false, sends fls(0)-1=0xFFFFFFFF to PPSMC_MSG_PCIeDPM_ForceLevel. mask==0 check at :4366 does NOT cover zero intersection. Root-only sysfs. GPU hang/firmware fault. Fix: if(!tmp) return -EINVAL.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-1169 Β· 3 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | verdict | Source-confirmation verdict for DF-1169 | 619 B | β raw |
| fix.diff | suggested-fix | Guard tmp==0 before fls(tmp) to prevent underflow | 445 B | view raw |
| ../fix_build.log | build-log | Batch kernel build log (all fixes, rc=0) | 5.6 MB | β download |
DF-1169 Verification Verdict
Severity: Low Impact class: logic Verification method: Source-only confirmation (HW-gated, not triggerable on QEMU guest)
Verdict: REPRODUCED (source-confirmed)
The bug is confirmed in the audited source at the cited path:line. Triggerable but requires specific driver/config.
Fix: Guard tmp==0 before fls(tmp) to prevent underflow
Fix applied and validated in batch kernel build (rc=0, -Werror).
Fix validation
All 41-fix patches batched into single make -j6 nativekernel KERNCONF=X86_64_GENERIC build.
Build result: rc=0, 0 errors (full -Werror clean).
Fix verification
fixedVALIDATED: fix.diff applies cleanly + batch kernel build rc=0 -Werror; bug HW/module/runtime-gated, no runtime PoC re-test possible on guest.
VALIDATED: fix.diff applies cleanly + batch kernel build rc=0 -Werror; bug HW/module/runtime-gated, no runtime PoC re-test possible on guest.
Confirmed kernel references
β
Detail
Exploit chain
none
Evidence (decisive lines)
REPRODUCED (source-only): smu7_force_clock_level computes fls(0)-1=0xFFFFFFFF when mask=0 against specific subfield; sends bogus PCIe force level. Logic bug.
Verified recommended fix
REPRODUCED (source-only): smu7_force_clock_level computes fls(0)-1=0xFFFFFFFF when mask=0 against specific subfield; sends bogus PCIe force level. Logic bug.
Verdict
REPRODUCED (source-only): smu7_force_clock_level computes fls(0)-1=0xFFFFFFFF when mask=0 against specific subfield; sends bogus PCIe force level. Logic bug.
No comments yet.