drm/amdgpu: fix division by zero with invalid uvd dimensions
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ d38ceaf99ed015f2a0b9af3499791bd3a3daae21 · < ffb33d466a68cea3e8a3dbed04d79037a3cbabd1| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: fix division by zero with invalid uvd dimensions
When width or height is less than 16, width_in_mb or height_in_mb becomes 0, leading to fs_in_mb being 0. This causes a division by zero when calculating num_dpb_buffer in H264 and H264 Perf decode paths.
Add validation to reject frames with width < 16 or height < 16 before performing any calculations that depend on these values.
V2: Format change - move up all vaiable definitions. V3: Use warn_once to avoid spam.
(cherry picked from commit 3e41d26c70b0a459d041cc19482a226c4b7423cb)
From the CVE record · Linux
The Linux kernel’s amdgpu UVD H264 decode paths can divide by zero when a frame’s width or height is less than 16. The input does not specify how an attacker could submit such a frame, whether authentication or user interaction is required, or the resulting impact.
Engineers running Linux kernels with amdgpu UVD decode support should check their installations; affected versions are not specified.