1. Archivio CVE
  2. 2022
  3. CVE-2022-50293

CVE-2022-50293

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

Descrizione

In the Linux kernel, the following vulnerability has been resolved: btrfs: do not BUG_ON() on ENOMEM when dropping extent items for a range If we get -ENOMEM while dropping file extent items in a given range, at btrfs_drop_extents(), due to failure to allocate memory when attempting to increment the reference count for an extent or drop the reference count, we handle it with a BUG_ON(). This is excessive, instead we can simply abort the transaction and return the error to the caller. In fact most callers of btrfs_drop_extents(), directly or indirectly, already abort the transaction if btrfs_drop_extents() returns any error. Also, we already have error paths at btrfs_drop_extents() that may return -ENOMEM and in those cases we abort the transaction, like for example anything that changes the b+tree may return -ENOMEM due to a failure to allocate a new extent buffer when COWing an existing extent buffer, such as a call to btrfs_duplicate_item() for example. So replace the BUG_ON() calls with proper logic to abort the transaction and return the error.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
linux linux kernel < 5.15.86 –
linux linux kernel >= 5.16 < 6.0.16 –
linux linux kernel >= 6.1 < 6.1.2 –
Tutte le 23.461 vulnerabilità di Linux Kernel

Tipo di vulnerabilità

CWE-617 Asserzione raggiungibile

Il prodotto contiene un assert() o un’istruzione simile che un attaccante può far scattare, causando la chiusura dell’applicazione o un comportamento più grave del necessario.

Impatto sui sistemi

AmbitoImpatto
Disponibilità Interruzione del servizio: arresto o riavvio

Come si previene

Sviluppo If the assertion statement is required (e.g., for security or reliability), change the invoking code to avoid the conditions that trigger the assertion.
Sviluppo Consider changing the assertion to some other less fatal error. This might not be easy to implement, since other code may be needed to handle the error.
Sviluppo Make sensitive open/close operations non-reachable from directly user-controlled data (e.g. open/close resources)
Sviluppo · Validazione dell’input Perform input validation on user data.

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

Tutte le 925 CVE di tipo CWE-617, con andamento e prevenzione

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