drm/amdgpu: zero-initialize GART table on allocation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ d38ceaf99ed015f2a0b9af3499791bd3a3daae21 · < e6c2e6c2e1fa066968a16aca1cb66cd1bdde7741| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: zero-initialize GART table on allocation
GART TLB is flushed after unmapping but not after mapping. Since amdgpu_bo_create_kernel() does not zero-initialize the buffer, when a single PTE is written the TLB may speculatively load other uninitialized entries from the same cacheline. Those garbage entries can appear valid, and a subsequent write to another PTE in the same cacheline may cause the GPU to use a stale garbage PTE from the TLB.
Fix this by calling memset_io() to zero-initialize the GART table with gart_pte_flags immediately after allocation.
Using AMDGPU_GEM_CREATE_VRAM_CLEARED, SDMA-based clear will not work since SDMA needs GART to be initialized to work.
(cherry picked from commit d9af8263b82b6eaa60c5718e0c6631c5037e4b24)
From the CVE record · Linux
The Linux kernel's amdgpu driver does not zero-initialize the GART table when it is allocated. During mapping, the GPU may load uninitialized entries and later use a stale, invalid page-table entry. The input does not specify an attacker action, access requirement, or user interaction.
Engineers running Linux systems that use the amdgpu driver should check their kernel; affected versions are not specified.