DF-4041 / verdict.json
{ "finding_id": "DF-4041", "status": "inconclusive", "reproduced": 0, "impact": "none", "confidence": "certain", "verdict": "Source-certain MCLK-stash defects (polaris-unique checklist item h): (a) polaris10_populate_smc_mvdd_table writes Pattern[level] but reads data->mvdd_voltage_table.entries[count] with count = min(table count, SMU_MAX_SMIO_LEVELS=4) (polaris10_smumgr.c:657) \u2014 a wrong-index read one past the VALID (trimmed-to-4, smu7_hwmgr.c:344-349) entries, so every MVDD smio pattern is programmed with the stale/zero slot (demonstrated: run.log DF-4041a \u2014 all patterns 0 instead of 1100..1400); (b) polaris10_populate_mvdd_value loops i < vdd_dep_on_mclk->count (RAW VBIOS u8, :1183) reading mvdd_voltage_table.entries[i] from the fixed entries[PP_ATOMCTRL_MAX_VOLTAGE_ENTRIES=32] array (:1185) \u2014 dep counts 33..255 read past the pp_atomctrl_voltage_table into the rest of struct smu7_hwmgr (intra-struct heap OOB read; loop only stops early if a clk happens to match). Demonstrated: run.log DF-4041b (8 reads past at count 40). Hardware-gated -> runtime inconclusive, source certain.", "exploit_chain": "crafted vBIOS: (a) any GPIO-MVDD board config -> all MVDD patterns read the zero slot (mis-programmed memory voltage); (b) vdd_dep_on_mclk->count > 32 -> entries[i] intra-struct OOB reads", "evidence": "run.log sections DF-4041a/b; VERDICT.md; fix_build.log; env.txt", "kernel_refs": [ "sys/dev/drm/amd/powerplay/smumgr/polaris10_smumgr.c:657", "sys/dev/drm/amd/powerplay/smumgr/polaris10_smumgr.c:1183", "sys/dev/drm/amd/powerplay/smumgr/polaris10_smumgr.c:1185", "sys/dev/drm/amd/powerplay/hwmgr/ppatomctrl.h:45", "sys/dev/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:344" ], "poc_changes": "Pass-2 reviewer authored demonstrator compiling the kernels own headers (smu74.h/smu74_discrete.h packed, or a verbatim copy of the drivers amdsentmsg/parsemsg arms) so struct geometry and branch selection are the kernels; fix.diff generated against the pristine file and compile-validated via full nativekernel rebuild on the guest (shared build with DF-4036..DF-4044, fix_build.log).", "attempts": 3, "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": 200, "guest_dirty": 0, "build_cmd": "./build.sh", "run_cmd": "./run.sh", "code_hash": "a80c6d8179c5b51037b9b3c57bf5e23b8ff1b9791b667178a4b0fd8bf2b68475", "notes": "Hardware-gated (no Polaris GPU on guest; crafted-VBIOS threat model; amd-gpu absent per env.txt). Checklist kills: LinkLevel walk bounded (smu7_hwmgr.c:561-569 clamp), mc_reg walks not in this file, fan div0 = known DF-1345, VCE/UVD overflow = known DF-1346, Smio walks clamped.", "recommended_fix": "Read entries[level] in the MVDD pattern loop and bound the populate_mvdd_value walk by PP_ATOMCTRL_MAX_VOLTAGE_ENTRIES (fix.diff)", "fix_status": "fixed", "fix_baseline_reproduced": 0, "fix_patched_reproduced": 0, "fix_kernel_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 (nativekernel X86_64_GENERIC rebuilt with all DF-4036..DF-4044 patches; 0 errors under -Werror; see fix_build.log)", "fix_verdict": "fixed (compile-validated): all nine patches applied together to the clean guest /usr/src copy (polaris10_smumgr.c md5 6f39bb32..->19a2b278.., amd.c f577a330..->54ce1518..), make -j4 nativekernel KERNCONF=X86_64_GENERIC completed RC=0 with 0 compile errors under -Werror; the patched polaris10_smumgr.o (amdgpu module) and amd.o (GENERIC kernel) both recompiled. Runtime re-test impossible on this guest (device absent). Sources restored to pristine and md5-verified after validation.", "fix_evidence": "findings/poc/DF-4041/fix.diff; findings/poc/DF-4041/fix_build.log (build banner + compile lines + 0 errors)" } |