Descrizione
In the Linux kernel, the following vulnerability has been resolved: dm: clear cloned request bio pointer when last clone bio completes Stale rq->bio values have been observed to cause double-initialization of cloned bios in request-based device-mapper targets, leading to use-after-free and double-free scenarios. One such case occurs when using dm-multipath on top of a PCIe NVMe namespace, where cloned request bios are freed during blk_complete_request(), but rq->bio is left intact. Subsequent clone teardown then attempts to free the same bios again via blk_rq_unprep_clone(). The resulting double-free path looks like: nvme_pci_complete_batch() nvme_complete_batch() blk_mq_end_request_batch() blk_complete_request() // called on a DM clone request bio_endio() // first free of all clone bios ... rq->end_io() // end_clone_request() dm_complete_request(tio->orig) dm_softirq_done() dm_done() dm_end_request() blk_rq_unprep_clone() // second free of clone bios Fix this by clearing the clone request's bio pointer when the last cloned bio completes, ensuring that later teardown paths do not attempt to free already-released bios.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.8.
Versioni da aggiornare
- Linux Linux Kernel: vulnerabili le versioni dalla
6.1precedenti alla6.1.165→ aggiornare alla6.1.165o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.2precedenti alla6.6.128→ aggiornare alla6.6.128o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.7precedenti alla6.12.75→ aggiornare alla6.12.75o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.13precedenti alla6.18.16→ aggiornare alla6.18.16o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.19precedenti alla6.19.6→ aggiornare alla6.19.6o successiva.
Patch e advisory
- Patch: git.kernel.org/stable/c/7daf279c674d515fb22a727a7bb…
- Patch: git.kernel.org/stable/c/83d72091804600ead96dc9e9f51…
- Patch: git.kernel.org/stable/c/8d9ddad561136f7e6a9346767bf…
- Patch: git.kernel.org/stable/c/b1c1a2637ebd675aa2d71fee8c7…
- Patch: git.kernel.org/stable/c/e2e738e8dfbbf83bd2bae0467ec…
- Patch: git.kernel.org/stable/c/fb8a6c18fb9a6561f7a15b58b27…
- Patch: git.kernel.org/stable/c/3d746b639be4b4f5cd8ce2b06aa…
- Patch: git.kernel.org/stable/c/9a95b98202113045bc1a5bcb303…
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 | ≥ 6.1 < 6.1.165 | 6.1.165 |
| Linux | Linux Kernel | ≥ 6.2 < 6.6.128 | 6.6.128 |
| Linux | Linux Kernel | ≥ 6.7 < 6.12.75 | 6.12.75 |
| Linux | Linux Kernel | ≥ 6.13 < 6.18.16 | 6.18.16 |
| Linux | Linux Kernel | ≥ 6.19 < 6.19.6 | 6.19.6 |
Riferimenti
- Patchhttps://git.kernel.org/stable/c/7daf279c674d515fb22a727a7bbc92aeb35c5442
- Patchhttps://git.kernel.org/stable/c/83d72091804600ead96dc9e9f518ea56cb4942f6
- Patchhttps://git.kernel.org/stable/c/8d9ddad561136f7e6a9346767bf97b4d79e38e67
- Patchhttps://git.kernel.org/stable/c/b1c1a2637ebd675aa2d71fee8c70da8791d73850
- Patchhttps://git.kernel.org/stable/c/e2e738e8dfbbf83bd2bae0467ec4420cc52da42a
- Patchhttps://git.kernel.org/stable/c/fb8a6c18fb9a6561f7a15b58b272442b77a242dd
- Patchhttps://git.kernel.org/stable/c/3d746b639be4b4f5cd8ce2b06aa52dc443f50edc
- Patchhttps://git.kernel.org/stable/c/9a95b98202113045bc1a5bcb30388a500f25e050