CVE-2024-26846
nvme-fc: do not wait in vain when unloading module
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
In the Linux kernel, the following vulnerability has been resolved:
nvme-fc: do not wait in vain when unloading module
The module exit path has race between deleting all controllers and
freeing 'left over IDs'. To prevent double free a synchronization
between nvme_delete_ctrl and ida_destroy has been added by the initial
commit.
There is some logic around trying to prevent from hanging forever in
wait_for_completion, though it does not handling all cases. E.g.
blktests is able to reproduce the situation where the module unload
hangs forever.
If we completely rely on the cleanup code executed from the
nvme_delete_ctrl path, all IDs will be freed eventually. This makes
calling ida_destroy unnecessary. We only have to ensure that all
nvme_delete_ctrl code has been executed before we leave
nvme_fc_exit_module. This is done by flushing the nvme_delete_wq
workqueue.
While at it, remove the unused nvme_fc_wq workqueue too.
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: nvme-fc: no espere en vano al descargar el módulo. La ruta de salida del módulo tiene una carrera entre eliminar todos los controladores y liberar los 'ID sobrantes'. Para evitar la doble liberación, la confirmación inicial agregó una sincronización entre nvme_delete_ctrl e ida_destroy. Existe cierta lógica al tratar de evitar que se cuelgue para siempre en wait_for_completion, aunque no maneja todos los casos. Por ejemplo, blktests puede reproducir la situación en la que la descarga del módulo se bloquea para siempre. Si confiamos completamente en el código de limpieza ejecutado desde la ruta nvme_delete_ctrl, eventualmente se liberarán todas las ID. Esto hace que llamar a ida_destroy sea innecesario. Solo tenemos que asegurarnos de que todo el código nvme_delete_ctrl se haya ejecutado antes de salir de nvme_fc_exit_module. Esto se hace vaciando la cola de trabajo nvme_delete_wq. Mientras lo hace, elimine también la cola de trabajo nvme_fc_wq no utilizada.
CVSS Scores
SSVC
- Decision:Track
Timeline
- 2024-02-19 CVE Reserved
- 2024-04-17 CVE Published
- 2024-04-18 EPSS Updated
- 2024-12-19 CVE Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
- CWE-415: Double Free
CAPEC
References (9)
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://access.redhat.com/security/cve/CVE-2024-26846 | 2024-11-12 | |
https://bugzilla.redhat.com/show_bug.cgi?id=2275558 | 2024-11-12 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | < 5.10.211 Search vendor "Linux" for product "Linux Kernel" and version " < 5.10.211" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | < 5.15.150 Search vendor "Linux" for product "Linux Kernel" and version " < 5.15.150" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | < 6.1.80 Search vendor "Linux" for product "Linux Kernel" and version " < 6.1.80" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | < 6.6.19 Search vendor "Linux" for product "Linux Kernel" and version " < 6.6.19" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | < 6.7.7 Search vendor "Linux" for product "Linux Kernel" and version " < 6.7.7" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | < 6.8 Search vendor "Linux" for product "Linux Kernel" and version " < 6.8" | en |
Affected
|