Descrizione
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)
Tipo di vulnerabilità
CWE-457
Use of Uninitialized Variable
The code uses a variable that has not been initialized, leading to unpredictable or unintended results.
Impatto sui sistemi
| Ambito | Impatto |
| Riservatezza, Integrità, Disponibilità, Altro |
Dipende dal contesto, Leggere i dati dell’applicazione |
| Disponibilità |
Alterare la logica di esecuzione, Stato imprevisto |
| Autorizzazione, Altro |
Dipende dal contesto |
Come si previene
Sviluppo · Riduzione della superficie di attacco
Ensure that critical variables are initialized before first use.
Build e compilazione · Hardening della compilazione
Most compilers will complain about the use of uninitialized variables if warnings are turned on.
Sviluppo · Esercizio
When using a language that does not require explicit declaration of variables, run or compile the software in a mode that reports undeclared or unknown variables. This may indicate the presence of a typographic error in the variable's name.
Requisiti · Scelta del linguaggio
Choose a language that is not susceptible to these issues.
Architettura e progettazione
Mitigating technologies such as safe string libraries and container abstractions could be introduced.
Tutte le 222 CVE di tipo CWE-457, con andamento e prevenzione