Descrizione
In the Linux kernel, the following vulnerability has been resolved: fs/mbcache: cancel shrink work before destroying the cache mb_cache_destroy() calls shrinker_free() and then frees all cache entries and the cache itself, but it does not cancel the pending c_shrink_work work item first. If mb_cache_entry_create() schedules c_shrink_work via schedule_work() and the work item is still pending or running when mb_cache_destroy() runs, mb_cache_shrink_worker() will access the cache after its memory has been freed, causing a use-after-free. This is only reachable by a privileged user (root or CAP_SYS_ADMIN) who can trigger the last put of a mounted ext2/ext4/ocfs2 filesystem. Cancel the work item with cancel_work_sync() before calling shrinker_free(), ensuring the worker has finished and will not be rescheduled before the cache is torn down.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.8.
Versioni da aggiornare
- Linux Linux Kernel: vulnerabili le versioni dalla
4.6precedenti alla6.12.91→ aggiornare alla6.12.91o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.13precedenti alla6.18.33→ aggiornare alla6.18.33o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.19precedenti alla7.0.10→ aggiornare alla7.0.10o successiva.
Patch e advisory
- Patch: git.kernel.org/stable/c/0e4eff315d799f5842b95872199…
- Patch: git.kernel.org/stable/c/a88d39a74a208e197c03bffaa2d…
- Patch: git.kernel.org/stable/c/b25fd3523bef88fb7ffd4c5b63b…
- Patch: git.kernel.org/stable/c/d227786ab1119669df4dc333a61…
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Ridurre la superficie esposta (disattivare servizi e funzionalità inutilizzati), mantenere attive le protezioni del sistema operativo (ASLR, DEP/NX) e segmentare la rete.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| Linux | Linux Kernel | ≥ 4.6 < 6.12.91 | 6.12.91 |
| Linux | Linux Kernel | ≥ 6.13 < 6.18.33 | 6.18.33 |
| Linux | Linux Kernel | ≥ 6.19 < 7.0.10 | 7.0.10 |
Riferimenti
- Patchhttps://git.kernel.org/stable/c/0e4eff315d799f5842b95872199b0f0fb8ef5f51
- Patchhttps://git.kernel.org/stable/c/a88d39a74a208e197c03bffaa2df34de732af19f
- Patchhttps://git.kernel.org/stable/c/b25fd3523bef88fb7ffd4c5b63bbe9c08f73bb4c
- Patchhttps://git.kernel.org/stable/c/d227786ab1119669df4dc333a61510c52047cce4
- Riferimentohttps://git.kernel.org/stable/c/40148c615687c1692712e50a6de53d62dfbfc20f
- Riferimentohttps://git.kernel.org/stable/c/cbdd6f0fb19a0ce8a013acd80ac87a62f57fa20d