drm/amd/display: Clamp VBIOS HDMI retimer register count to array size
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1e8635ea0ea370bf4f0f2b2f1b3eb61474dd962a · < 8aaa7e317fbd4beb9c6a9f77aa4cf52fae78b117| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: Clamp VBIOS HDMI retimer register count to array size
[Why & How] The VBIOS integrated info tables (v1_11 and v2_1) contain HdmiRegNum and Hdmi6GRegNum fields that are used as loop bounds when copying retimer I2C register settings into fixed-size arrays (dp*_ext_hdmi_reg_settings[9] and dp*_ext_hdmi_6g_reg_settings[3]). These u8 fields are not validated before use, so a malformed VBIOS can specify values up to 255, causing an out-of-bounds heap write during driver probe.
Clamp each register count to the destination array size using min_t() before the copy loops, in both get_integrated_info_v11() and get_integrated_info_v2_1().
(cherry picked from commit 5a7f0ef90195940c54b0f5bb85b87da55f038c69)
From the CVE record · Linux
The Linux kernel AMD display driver does not validate HDMI retimer register counts in VBIOS integrated info tables before copying settings into fixed-size arrays. A malformed VBIOS can cause an out-of-bounds heap write during driver probe. The input does not establish how an attacker could supply the VBIOS or whether authentication or user interaction is required.
Engineers running Linux kernels with the AMD display driver should check their kernel versions; affected versions are not specified.