drm/amd/display: fix shift-out-of-bounds in CalculateVMAndRowBytes
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: fix shift-out-of-bounds in CalculateVMAndRowBytes
[WHY] When PTEBufferSizeInRequests is zero, UBSAN reports the following warning because dml_log2 returns an unexpected negative value:
shift exponent 4294966273 is too large for 32-bit type 'int'
[HOW]
In the case PTEBufferSizeInRequests is zero, skip the dml_log2() and assign the result directly.
From the CVE record · Linux
The Linux kernel’s AMD display code can perform an out-of-bounds shift in CalculateVMAndRowBytes when PTEBufferSizeInRequests is zero. The input does not establish how an attacker could trigger this condition or whether access, authentication, or user interaction is required.
Engineers running Linux kernels with AMD display support should check their versions against the vendor advisory; affected versions are not specified in the input.