CVE-2022-49218

Severity CVSS v4.0:
Pending analysis
Type:
CWE-125 Out-of-bounds Read
Publication date:
26/02/2025
Last modified:
01/10/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> drm/dp: Fix OOB read when handling Post Cursor2 register<br /> <br /> The link_status array was not large enough to read the Adjust Request<br /> Post Cursor2 register, so remove the common helper function to avoid<br /> an OOB read, found with a -Warray-bounds build:<br /> <br /> drivers/gpu/drm/drm_dp_helper.c: In function &amp;#39;drm_dp_get_adjust_request_post_cursor&amp;#39;:<br /> drivers/gpu/drm/drm_dp_helper.c:59:27: error: array subscript 10 is outside array bounds of &amp;#39;const u8[6]&amp;#39; {aka &amp;#39;const unsigned char[6]&amp;#39;} [-Werror=array-bounds]<br /> 59 | return link_status[r - DP_LANE0_1_STATUS];<br /> | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~<br /> drivers/gpu/drm/drm_dp_helper.c:147:51: note: while referencing &amp;#39;link_status&amp;#39;<br /> 147 | u8 drm_dp_get_adjust_request_post_cursor(const u8 link_status[DP_LINK_STATUS_SIZE],<br /> | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br /> <br /> Replace the only user of the helper with an open-coded fetch and decode,<br /> similar to drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.5 (including) 5.17.2 (excluding)