Descrizione
In the Linux kernel, the following vulnerability has been resolved: HID: lg-g15: cancel pending work on remove to fix a use-after-free lg_g15_data is allocated with devm and holds a work item. The report handlers schedule that work straight from device input. lg_g15_event() and lg_g15_v2_event() do it on the backlight cycle key, and lg_g510_leds_event() does it too. The worker dereferences the lg_g15_data back through container_of. The driver had no remove callback and never cancelled the work. So if a report scheduled the work and the keyboard was then unplugged, devres freed lg_g15_data while the work was still pending or running, and the worker touched freed memory. This is a use-after-free. It is reachable as a race on device unplug. Add a remove callback that cancels the work before devres frees the state. g15->work is only initialized for the models that schedule it (G15, G15 v2, G510). The G13 and Z-10 leave it zeroed, so guard the cancel on g15->work.func to avoid cancelling a work that was never set up. The g15 NULL test mirrors the one already in lg_g15_raw_event().
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.8.
Versioni da aggiornare
- Linux Linux Kernel: vulnerabili le versioni dalla
5.5precedenti alla5.10.261→ aggiornare alla5.10.261o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
5.11precedenti alla5.15.212→ aggiornare alla5.15.212o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
5.16precedenti alla6.1.178→ aggiornare alla6.1.178o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.2precedenti alla6.6.145→ aggiornare alla6.6.145o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.7precedenti alla6.12.96→ aggiornare alla6.12.96o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.13precedenti alla6.18.39→ aggiornare alla6.18.39o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.19precedenti alla7.1.4→ aggiornare alla7.1.4o successiva. - Linux Linux Kernel: vulnerabile la versione
7.2 rc1→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
7.2 rc2→ installare l'ultima release supportata dal vendor.
Patch e advisory
- Patch: git.kernel.org/stable/c/33cd1a000daf929356aacf2b191…
- Patch: git.kernel.org/stable/c/3b9a3919aac6977262f04d5365c…
- Patch: git.kernel.org/stable/c/4aef9676c26dff8723b56834951…
- Patch: git.kernel.org/stable/c/4d0d51bc12d246accbfbb94de05…
- Patch: git.kernel.org/stable/c/7705b4140d188ce22656f6e541a…
- Patch: git.kernel.org/stable/c/8131f4226688c4be5f30874d167…
- Patch: git.kernel.org/stable/c/acce9dee807f21184fff19ad17c…
- Patch: git.kernel.org/stable/c/dfc6e61f83113cc18346b6988f0…
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 | ≥ 5.5 < 5.10.261 | 5.10.261 |
| Linux | Linux Kernel | ≥ 5.11 < 5.15.212 | 5.15.212 |
| Linux | Linux Kernel | ≥ 5.16 < 6.1.178 | 6.1.178 |
| Linux | Linux Kernel | ≥ 6.2 < 6.6.145 | 6.6.145 |
| Linux | Linux Kernel | ≥ 6.7 < 6.12.96 | 6.12.96 |
| Linux | Linux Kernel | ≥ 6.13 < 6.18.39 | 6.18.39 |
| Linux | Linux Kernel | ≥ 6.19 < 7.1.4 | 7.1.4 |
| Linux | Linux Kernel | 7.2 rc1 | — |
| Linux | Linux Kernel | 7.2 rc2 | — |
Riferimenti
- Patchhttps://git.kernel.org/stable/c/33cd1a000daf929356aacf2b191d31714ff0615e
- Patchhttps://git.kernel.org/stable/c/3b9a3919aac6977262f04d5365c0456877522a44
- Patchhttps://git.kernel.org/stable/c/4aef9676c26dff8723b56834951cfc6b618f0986
- Patchhttps://git.kernel.org/stable/c/4d0d51bc12d246accbfbb94de05d729c68c9b8fb
- Patchhttps://git.kernel.org/stable/c/7705b4140d188ce22656f6e541ae7ef834c7e11a
- Patchhttps://git.kernel.org/stable/c/8131f4226688c4be5f30874d167e44dab838eb09
- Patchhttps://git.kernel.org/stable/c/acce9dee807f21184fff19ad17c8ed464247e7f7
- Patchhttps://git.kernel.org/stable/c/dfc6e61f83113cc18346b6988f07271c0063357d