Descrizione
In the Linux kernel, the following vulnerability has been resolved: dm: fix a buffer overflow in ioctl processing Tony Asleson (using Claude) found a buffer overflow in dm-ioctl in the function retrieve_status: 1. The code in retrieve_status checks that the output string fits into the output buffer and writes the output string there 2. Then, the code aligns the "outptr" variable to the next 8-byte boundary: outptr = align_ptr(outptr); 3. The alignment doesn't check overflow, so outptr could point past the buffer end 4. The "for" loop is iterated again, it executes: remaining = len - (outptr - outbuf); 5. If "outptr" points past "outbuf + len", the arithmetics wraps around and the variable "remaining" contains unusually high number 6. With "remaining" being high, the code writes more data past the end of the buffer Luckily, this bug has no security implications because: 1. Only root can issue device mapper ioctls 2. The commonly used libraries that communicate with device mapper (libdevmapper and devicemapper-rs) use buffer size that is aligned to 8 bytes - thus, "outptr = align_ptr(outptr)" can't overshoot the input buffer and the bug can't happen accidentally
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.8.
Versioni da aggiornare
- Linux Linux Kernel: vulnerabili le versioni dalla
2.6.12.1precedenti alla5.10.258→ aggiornare alla5.10.258o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
5.11precedenti alla5.15.209→ aggiornare alla5.15.209o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
5.16precedenti alla6.1.175→ aggiornare alla6.1.175o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.2precedenti alla6.6.140→ aggiornare alla6.6.140o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.7precedenti alla6.12.88→ aggiornare alla6.12.88o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.13precedenti alla6.18.30→ aggiornare alla6.18.30o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.19precedenti alla7.0.7→ aggiornare alla7.0.7o successiva. - Linux Linux Kernel: vulnerabile la versione
2.6.12→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
2.6.12 rc2→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
2.6.12 rc3→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
2.6.12 rc4→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
2.6.12 rc5→ installare l'ultima release supportata dal vendor.
Patch e advisory
- Patch: git.kernel.org/stable/c/2fa49cc884f6496a915c35621ba…
- Patch: git.kernel.org/stable/c/448ee8fb79c26a26599ffa4b2ad…
- Patch: git.kernel.org/stable/c/526ff9126a0ae087b65726e1faf…
- Patch: git.kernel.org/stable/c/5af6a879e915ae7bcd83695c316…
- Patch: git.kernel.org/stable/c/8daa6c708ef524089ae43f2aed9…
- Patch: git.kernel.org/stable/c/c8c5311237448f6ffeecc9aec23…
- Patch: git.kernel.org/stable/c/d271631023cbe1cbe7c31a0275a…
- Patch: git.kernel.org/stable/c/f0b0b09d9840838ae77ccdd6a62…
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 | ≥ 2.6.12.1 < 5.10.258 | 5.10.258 |
| Linux | Linux Kernel | ≥ 5.11 < 5.15.209 | 5.15.209 |
| Linux | Linux Kernel | ≥ 5.16 < 6.1.175 | 6.1.175 |
| Linux | Linux Kernel | ≥ 6.2 < 6.6.140 | 6.6.140 |
| Linux | Linux Kernel | ≥ 6.7 < 6.12.88 | 6.12.88 |
| Linux | Linux Kernel | ≥ 6.13 < 6.18.30 | 6.18.30 |
| Linux | Linux Kernel | ≥ 6.19 < 7.0.7 | 7.0.7 |
| Linux | Linux Kernel | 2.6.12 | — |
| Linux | Linux Kernel | 2.6.12 rc2 | — |
| Linux | Linux Kernel | 2.6.12 rc3 | — |
| Linux | Linux Kernel | 2.6.12 rc4 | — |
| Linux | Linux Kernel | 2.6.12 rc5 | — |
Riferimenti
- Patchhttps://git.kernel.org/stable/c/2fa49cc884f6496a915c35621ba4da35649bf159
- Patchhttps://git.kernel.org/stable/c/448ee8fb79c26a26599ffa4b2adeb4322d3d3d8c
- Patchhttps://git.kernel.org/stable/c/526ff9126a0ae087b65726e1faf31114c718020d
- Patchhttps://git.kernel.org/stable/c/5af6a879e915ae7bcd83695c316ebb32e1c61bc2
- Patchhttps://git.kernel.org/stable/c/8daa6c708ef524089ae43f2aed9190acb26d7df8
- Patchhttps://git.kernel.org/stable/c/c8c5311237448f6ffeecc9aec2362e3692623668
- Patchhttps://git.kernel.org/stable/c/d271631023cbe1cbe7c31a0275ab797883be6e0a
- Patchhttps://git.kernel.org/stable/c/f0b0b09d9840838ae77ccdd6a62de0daef4e6e0a
- Riferimentohttps://cert-portal.siemens.com/productcert/html/ssa-784472.html