1. Archivio CVE
  2. 2024
  3. CVE-2024-41012

CVE-2024-41012

6.3 Gravità media CVSS v3.1 · fonte NVD CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:H 6.3 – Media

Descrizione

In the Linux kernel, the following vulnerability has been resolved: filelock: Remove locks reliably when fcntl/close race is detected When fcntl_setlk() races with close(), it removes the created lock with do_lock_file_wait(). However, LSMs can allow the first do_lock_file_wait() that created the lock while denying the second do_lock_file_wait() that tries to remove the lock. Separately, posix_lock_file() could also fail to remove a lock due to GFP_KERNEL allocation failure (when splitting a range in the middle). After the bug has been triggered, use-after-free reads will occur in lock_get_status() when userspace reads /proc/locks. This can likely be used to read arbitrary kernel memory, but can't corrupt kernel memory. Fix it by calling locks_remove_posix() instead, which is designed to reliably get rid of POSIX locks associated with the given file and files_struct and is also used by filp_flush().

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
linux linux kernel >= 2.6.13 < 4.19.319 –
linux linux kernel >= 4.20 < 5.4.281 –
linux linux kernel >= 5.5 < 5.10.223 –
linux linux kernel >= 5.11 < 5.15.164 –
linux linux kernel >= 5.16 < 6.1.101 –
linux linux kernel >= 6.2 < 6.6.42 –
linux linux kernel >= 6.7 < 6.9.9 –
linux linux kernel 6.10 rc1 –
linux linux kernel 6.10 rc2 –
linux linux kernel 6.10 rc3 –
linux linux kernel 6.10 rc4 –
linux linux kernel 6.10 rc5 –
linux linux kernel 6.10 rc6 –
Tutte le 24.085 vulnerabilità di Linux Kernel

Tipo di vulnerabilità

CWE-416 Uso di memoria dopo la liberazione (use after free)

Il prodotto usa o fa riferimento a un’area di memoria dopo averla liberata. Nel frattempo quell’area può essere stata assegnata ad altro: ogni operazione fatta con il vecchio puntatore agisce su dati che non le appartengono più.

Impatto sui sistemi

AmbitoImpatto
Integrità Modificare la memoria
Disponibilità Interruzione del servizio: arresto o riavvio
Riservatezza Leggere la memoria
Integrità, Riservatezza, Disponibilità Eseguire codice o comandi non autorizzati

Come si previene

Architettura e progettazione · Scelta del linguaggio Choose a language that provides automatic memory management.
Sviluppo · Riduzione della superficie di attacco When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.

Le indicazioni di mitigazione sono riportate nella lingua originale del catalogo CWE del MITRE.

Tutte le 9.637 CVE di tipo CWE-416, con andamento e prevenzione

Fonte: catalogo CWE del MITRE · cwe.mitre.org