Description
In the Linux kernel, the following vulnerability has been resolved: drm/amd/pm: bound SCLK FCW range entries to the table size atomctrl_get_smc_sclk_range_table() copies ucSclkEntryNum entries from the VBIOS SMU_Info table into pp_atom_ctrl_sclk_range_table. Both the source (asSclkFcwRangeEntry[]) and destination (table->entry[]) arrays are fixed at MAX_SCLK_RANGE (8) entries, but ucSclkEntryNum is an unchecked u8 read straight from the VBIOS, so it can be up to 255. The destination is stack-allocated in both callers (polaris10_get_sclk_range_table(), vegam_get_sclk_range_table()), so a count above 8 overflows a stack buffer, not just a heap read. Reject counts above MAX_SCLK_RANGE rather than clamping to it. Only one version of this VBIOS struct (ATOM_SMU_INFO_V2_1) has ever existed, so a count above 8 corresponds to no legitimate table format and means either a corrupted or a tampered VBIOS.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
a23eefa2f4615af91ea496ca5b55c9e7c6fa934c to < 4fc26611a8c65039f569dd7b15a1bcfac234d2beaffecteda23eefa2f4615af91ea496ca5b55c9e7c6fa934c to < 126909d75548ffca71edbacf108c1b6b0c5b5bdbaffecteda23eefa2f4615af91ea496ca5b55c9e7c6fa934c to < 65d9be4bd9587c3d6bcfda749c61dbfd792f793caffecteda23eefa2f4615af91ea496ca5b55c9e7c6fa934c to < a73e358809d769cf3c9711931d78859c9c748872affecteda23eefa2f4615af91ea496ca5b55c9e7c6fa934c to < 737b47703046e440be4aad75c8ab256bbe8f9500affecteda23eefa2f4615af91ea496ca5b55c9e7c6fa934c to < 5ad40ed9d6888cc4828808cf49bdf58ec5f48290affecteda23eefa2f4615af91ea496ca5b55c9e7c6fa934c to < 21bf975597a11788cd324982181122945de44656affecteda23eefa2f4615af91ea496ca5b55c9e7c6fa934c to < f35aa5c77f5fca20fc269d6221df19c7b96704a5affected
Linux Linux
Default version status: affected
4.7affected0 to < 4.7unaffected5.10.275 to ≤ 5.10.*unaffected5.15.226 to ≤ 5.15.*unaffected6.1.193 to ≤ 6.1.*unaffected6.6.163 to ≤ 6.6.*unaffected6.12.119 to ≤ 6.12.*unaffected6.18.65 to ≤ 6.18.*unaffected7.3.6 to ≤ 7.3.*unaffected7.4-rc1 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/4fc26611a8c65039f569dd7b15a1bcfac234d2be ↗
- https://git.kernel.org/stable/c/126909d75548ffca71edbacf108c1b6b0c5b5bdb ↗
- https://git.kernel.org/stable/c/65d9be4bd9587c3d6bcfda749c61dbfd792f793c ↗
- https://git.kernel.org/stable/c/a73e358809d769cf3c9711931d78859c9c748872 ↗
- https://git.kernel.org/stable/c/737b47703046e440be4aad75c8ab256bbe8f9500 ↗
- https://git.kernel.org/stable/c/5ad40ed9d6888cc4828808cf49bdf58ec5f48290 ↗
- https://git.kernel.org/stable/c/21bf975597a11788cd324982181122945de44656 ↗
- https://git.kernel.org/stable/c/f35aa5c77f5fca20fc269d6221df19c7b96704a5 ↗