{
  "finding_id": "DF-4038",
  "status": "inconclusive",
  "reproduced": 0,
  "impact": "none",
  "confidence": "certain",
  "verdict": "Source-certain heap OOB write + read over table_info->vdd_dep_on_sclk (the RAW VBIOS dependency table, allocated with exactly count entries \u2014 hwmgr_ppt.h entries[1] flex): polaris10_populate_clock_stretcher_data_table walks i < sclk_table->count (polaris10_smumgr.c:1555) writing Sclk_voltageOffset[8] (:1574) \u2014 count>8 smears DpmTable+1704 (of 1884) past the array into ClockStretcherDataTable/CKS_LOOKUPTable and off smc_state_table; the walk runs BEFORE the stretch_amount validation at :1579 so even a rejected VBIOS value smears first; cks_enable<<i at :1556 is shift-UB for i>=8 (value only). The mirror bug in polaris10_populate_avfs_parameters (:1688-1691) walks i < NUM_VFT_COLUMNS=8 reading sclk_table->entries[i] regardless of count \u2014 a VBIOS with fewer than 8 SCLK dep entries reads past the heap allocation and the values are uploaded to SMU (:1697-1710). Demonstrated: run.log DF-4038a/b. fiji DF-4004 sibling. Hardware-gated -> runtime inconclusive, source certain.",
  "exploit_chain": "crafted vBIOS: (a) vdd_dep_on_sclk->count > 8 -> Sclk_voltageOffset[8] OOB byte writes; (b) count < 8 -> AVFS walk reads entries past the allocation, values go to SMU",
  "evidence": "run.log sections DF-4038a/b; VERDICT.md; fix_build.log; env.txt",
  "kernel_refs": [
    "sys/dev/drm/amd/powerplay/smumgr/polaris10_smumgr.c:1555",
    "sys/dev/drm/amd/powerplay/smumgr/polaris10_smumgr.c:1574",
    "sys/dev/drm/amd/powerplay/smumgr/polaris10_smumgr.c:1579",
    "sys/dev/drm/amd/powerplay/smumgr/polaris10_smumgr.c:1688",
    "sys/dev/drm/amd/powerplay/smumgr/polaris10_smumgr.c:1690",
    "sys/dev/drm/amd/powerplay/inc/smu74_discrete.h:361",
    "sys/dev/drm/amd/powerplay/inc/smu74.h:758"
  ],
  "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": 300,
  "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": "Clamp the clock-stretcher walk to NUM_VFT_COLUMNS(8) and bound the AVFS walk by sclk_table->count (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-4038/fix.diff; findings/poc/DF-4038/fix_build.log (build banner + compile lines + 0 errors)"
}