Descrizione
In the Linux kernel, the following vulnerability has been resolved: usb: xhci: Fix memory leak in xhci_disable_slot() xhci_alloc_command() allocates a command structure and, when the second argument is true, also allocates a completion structure. Currently, the error handling path in xhci_disable_slot() only frees the command structure using kfree(), causing the completion structure to leak. Use xhci_free_command() instead of kfree(). xhci_free_command() correctly frees both the command structure and the associated completion structure. Since the command structure is allocated with zero-initialization, command->in_ctx is NULL and will not be erroneously freed by xhci_free_command(). This bug was found using an experimental static analysis tool we are developing. The tool is based on the LLVM framework and is specifically designed to detect memory management issues. It is currently under active development and not yet publicly available, but we plan to open-source it after our research is published. The bug was originally detected on v6.13-rc1 using our static analysis tool, and we have verified that the issue persists in the latest mainline kernel. We performed build testing on x86_64 with allyesconfig using GCC=11.4.0. Since triggering these error paths in xhci_disable_slot() requires specific hardware conditions or abnormal state, we were unable to construct a test case to reliably trigger these specific error paths at runtime.
Come correggere
Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: CVSS 5.5.
Versioni da aggiornare
- Linux Linux Kernel: vulnerabili le versioni dalla
4.19.221precedenti alla4.20→ aggiornare alla4.20o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
5.4.165precedenti alla5.5→ aggiornare alla5.5o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
5.10.85precedenti alla5.10.253→ aggiornare alla5.10.253o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
5.15.8precedenti alla5.15.203→ aggiornare alla5.15.203o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
5.16precedenti alla6.1.167→ aggiornare alla6.1.167o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.2precedenti alla6.6.130→ aggiornare alla6.6.130o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.7precedenti alla6.12.78→ aggiornare alla6.12.78o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.13precedenti alla6.18.19→ aggiornare alla6.18.19o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.19precedenti alla6.19.9→ aggiornare alla6.19.9o successiva. - Linux Linux Kernel: vulnerabile la versione
7.0 rc1→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
7.0 rc2→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
7.0 rc3→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
7.0 rc4→ installare l'ultima release supportata dal vendor.
Patch e advisory
- Patch: git.kernel.org/stable/c/078b446efc0f5e496c31bccb72b…
- Patch: git.kernel.org/stable/c/1e800e26d54ccf2ddf2ea6d6cbe…
- Patch: git.kernel.org/stable/c/2e2baa8fb5aa4d080cbfeb84c51…
- Patch: git.kernel.org/stable/c/46aea90763832cd6e9b0c2e1c00…
- Patch: git.kernel.org/stable/c/6288baf0c8c4dcfbf206773aede…
- Patch: git.kernel.org/stable/c/807e4fb5140c73eb5dba1e399a9…
- Patch: git.kernel.org/stable/c/c1c8550e70401159184130a1afc…
- Patch: git.kernel.org/stable/c/c65f1b840ab8ce72ba68f1b63ba…
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 Kernel | ≥ 4.19.221 < 4.20 | 4.20 |
| Linux | Linux Kernel | ≥ 5.4.165 < 5.5 | 5.5 |
| Linux | Linux Kernel | ≥ 5.10.85 < 5.10.253 | 5.10.253 |
| Linux | Linux Kernel | ≥ 5.15.8 < 5.15.203 | 5.15.203 |
| Linux | Linux Kernel | ≥ 5.16 < 6.1.167 | 6.1.167 |
| Linux | Linux Kernel | ≥ 6.2 < 6.6.130 | 6.6.130 |
| Linux | Linux Kernel | ≥ 6.7 < 6.12.78 | 6.12.78 |
| Linux | Linux Kernel | ≥ 6.13 < 6.18.19 | 6.18.19 |
| Linux | Linux Kernel | ≥ 6.19 < 6.19.9 | 6.19.9 |
| Linux | Linux Kernel | 7.0 rc1 | — |
| Linux | Linux Kernel | 7.0 rc2 | — |
| Linux | Linux Kernel | 7.0 rc3 | — |
| Linux | Linux Kernel | 7.0 rc4 | — |
Riferimenti
- Patchhttps://git.kernel.org/stable/c/078b446efc0f5e496c31bccb72b98af979963a83
- Patchhttps://git.kernel.org/stable/c/1e800e26d54ccf2ddf2ea6d6cbe021c804d8aa62
- Patchhttps://git.kernel.org/stable/c/2e2baa8fb5aa4d080cbfeb84c51eff797529f413
- Patchhttps://git.kernel.org/stable/c/46aea90763832cd6e9b0c2e1c00e6a9512156d4b
- Patchhttps://git.kernel.org/stable/c/6288baf0c8c4dcfbf206773aede9c1f2269cec28
- Patchhttps://git.kernel.org/stable/c/807e4fb5140c73eb5dba1e399a990db5c1f3cdf8
- Patchhttps://git.kernel.org/stable/c/c1c8550e70401159184130a1afc6261db01fc0ce
- Patchhttps://git.kernel.org/stable/c/c65f1b840ab8ce72ba68f1b63bab7960f8fdfa89