drm/amdgpu: validate GEM_CREATE domain combinations
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 77a2faa55c1a497f4e7e89eabd11830f0e3cb3dd · < 220aa2589d7321fb68d2e8597862711b5f22ae0b| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: validate GEM_CREATE domain combinations
AMDGPU_GEM_CREATE checked domain bits against AMDGPU_GEM_DOMAIN_MASK, but did not validate domain combinations. Userspace could combine CPU|GTT|VRAM with DOORBELL, GDS, GWS, or OA, making amdgpu_bo_placement_from_domain() exceed AMDGPU_BO_MAX_PLACEMENTS and hit BUG_ON().
Allow combinations only within CPU/GTT/VRAM, and require non-CPU/GTT/ VRAM domains to be specified one at a time. Return -EINVAL for invalid combinations in amdgpu_gem_create_ioctl().
v2: Rename helper from amdgpu_gem_domain_valid() to amdgpu_gem_are_domains_valid() (Christian)
(cherry picked from commit db39852d0c39843cb02048dfb47e4b8c703e9080)
From the CVE record · Linux
The Linux kernel’s amdgpu GEM_CREATE ioctl did not validate combinations of memory domains. Local userspace could submit an invalid combination that exceeds the placement limit and triggers a kernel BUG_ON(). No separate user interaction is described.
Engineers running Linux kernels with the amdgpu driver should check their kernel versions; affected versions are not specified.