Descrizione
In the Linux kernel, the following vulnerability has been resolved: mm: fix unmap_mapping_range() beyond 4 GiB on 32-bit Commit 9eab0421fa94 ("mm: fix unmap_mapping_range high bits shift bug") made holebegin and holelen unsigned before they are shifted, by casting them to pgoff_t. That is an unsigned long: on a 32-bit kernel the cast cuts off the upper half of the two loff_t values, so a hole which begins at 4 GiB or beyond is taken for one in the first 4 GiB of the file. truncate_pagecache() passes the new size of the file and asks for private COWed pages to be unmapped as well. If a file of 6 GiB is truncated to 5 GiB, everything from 1 GiB on is unmapped, and what a process has written to a private mapping of the range between 1 GiB and 5 GiB is lost: it reads the contents of the file again. Where the range has an end, the wrong range is unmapped instead of the right one. The page cache copes with that, as it unmaps every folio that it removes. The callers which only have unmap_mapping_range() to get rid of user mappings do not, for example drm_vma_node_unmap(), whose fake offsets reach beyond 4 GiB on 32-bit, and revoke_iomem() with physical addresses of more than 32 bits. Cast to u64 instead. Nothing changes for 64-bit kernels. Fix generated by an LLM and sent by Josef Bacik in private.
Come correggere
Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: EPSS 0.2% (percentile 6).
Versioni da aggiornare
- Linux Linux: vulnerabili le versioni dalla
4.19.305precedenti alla4.20→ aggiornare alla4.20o successiva. - Linux Linux: vulnerabili le versioni dalla
5.4.267precedenti alla5.5→ aggiornare alla5.5o successiva. - Linux Linux: vulnerabili le versioni dalla
5.10.208precedenti alla5.11→ aggiornare alla5.11o successiva. - Linux Linux: vulnerabili le versioni dalla
5.15.147precedenti alla5.16→ aggiornare alla5.16o successiva. - Linux Linux: vulnerabili le versioni dalla
6.1.72precedenti alla6.2→ aggiornare alla6.2o successiva. - Linux Linux: vulnerabili le versioni dalla
6.6.11precedenti alla6.7→ aggiornare alla6.7o successiva. - Linux Linux: versione corretta
6.12.118(o successiva). - Linux Linux: versione corretta
6.18.64(o successiva). - Linux Linux: versione corretta
7.3.5(o successiva). - Linux Linux: versione corretta
7.4-rc2(o successiva). - Linux Linux: vulnerabile la versione
6.7→ installare l'ultima release supportata dal vendor.
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Ridurre l'esposizione del componente vulnerabile (segmentazione, accesso solo da reti fidate) finché la patch non è applicata.
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 | ≥ 4.19.305 < 4.20 | 4.20 |
| Linux | Linux | ≥ 5.4.267 < 5.5 | 5.5 |
| Linux | Linux | ≥ 5.10.208 < 5.11 | 5.11 |
| Linux | Linux | ≥ 5.15.147 < 5.16 | 5.16 |
| Linux | Linux | ≥ 6.1.72 < 6.2 | 6.2 |
| Linux | Linux | ≥ 6.6.11 < 6.7 | 6.7 |
| Linux | Linux | — | 6.12.118 |
| Linux | Linux | — | 6.18.64 |
| Linux | Linux | — | 7.3.5 |
| Linux | Linux | — | 7.4-rc2 |
| Linux | Linux | 6.7 | — |
Riferimenti
- Riferimentohttps://git.kernel.org/stable/c/0cf8d3fdd869fe079e55f8e621e45397a819d93c
- Riferimentohttps://git.kernel.org/stable/c/67e6d5468a7d693a00176713d44267e5360d63c3
- Riferimentohttps://git.kernel.org/stable/c/7a81bc23dade8082187be6d9cc36e4be4b7207e2
- Riferimentohttps://git.kernel.org/stable/c/cbf6c66a2ef46433092b41b87176755de32bf65b