In the Linux kernel, the following vulnerability has been resolved:
ice: fix concurrent reset and removal of VFs
Commit c503e63200c6 ("ice: Stop processing VF messages during teardown")
introduced a driver state flag, ICE_VF_DEINIT_IN_PROGRESS, which is
intended to prevent some issues with concurrently handling messages from
VFs while tearing down the VFs.
This change was motivated by crashes caused while tearing down and
bringing up VFs in rapid succession.
It turns out that the fix actually introduces issues with the VF driver
caused because the PF no longer responds to any messages sent by the VF
during its .remove routine. This results in the VF potentially removing
its DMA memory before the PF has shut down the device queues.
Additionally, the fix doesn't actually resolve concurrency issues within
the ice driver. It is possible for a VF to initiate a reset just prior
to the ice driver removing VFs. This can result in the remove task
concurrently operating while the VF is being reset. This results in
similar memory corruption and panics purportedly fixed by that commit.
Fix this concurrency at its root by protecting both the reset and
removal flows using the existing VF cfg_lock. This ensures that we
cannot remove the VF while any outstanding critical tasks such as a
virtchnl message or a reset are occurring.
This locking change also fixes the root cause originally fixed by commit
c503e63200c6 ("ice: Stop processing VF messages during teardown"), so we
can simply revert it.
Note that I kept these two changes together because simply reverting the
original commit alone would leave the driver vulnerable to worse race
conditions.
References
Configurations
Configuration 1 (hide)
|
History
19 Jun 2025, 13:15
Type | Values Removed | Values Added |
---|---|---|
References |
|
|
Summary | (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ice: corrige el restablecimiento y la eliminación simultáneos de VF. El commit c503e63200c6 ("ice: deja de procesar mensajes VF durante el desmontaje") introdujo un indicador de estado del controlador, ICE_VF_DEINIT_IN_PROGRESS, cuyo objetivo es evitar algunos problemas con el manejo simultáneo de mensajes de VF mientras se derriban los VF. Este cambio fue motivado por accidentes causados al derribar y levantar VF en rápida sucesión. Resulta que la solución en realidad introduce problemas con el controlador VF causados porque el PF ya no responde a ningún mensaje enviado por el VF durante su rutina .remove. Esto da como resultado que el VF elimine potencialmente su memoria DMA antes de que el PF haya cerrado las colas de dispositivos. Además, la solución en realidad no resuelve los problemas de concurrencia dentro del controlador Ice. Es posible que un VF inicie un reinicio justo antes de que el driver de hielo elimine los VF. Esto puede provocar que la tarea de eliminación funcione simultáneamente mientras se restablece el VF. Esto da como resultado una corrupción de memoria similar y pánicos supuestamente solucionados por esa confirmación. Corrija esta simultaneidad desde la raíz protegiendo los flujos de reinicio y eliminación utilizando el VF cfg_lock existente. Esto garantiza que no podamos eliminar el VF mientras se estén realizando tareas críticas pendientes, como un mensaje virtchnl o un reinicio. Este cambio de bloqueo también soluciona la causa raíz solucionada originalmente mediante el commit c503e63200c6 ("ice: Detener el procesamiento de mensajes VF durante el desmontaje"), por lo que simplemente podemos revertirlo. Tenga en cuenta que mantuve estos dos cambios juntos porque simplemente revertir el compromiso original dejaría al driver vulnerable a peores condiciones de ejecución. |
22 Aug 2024, 18:41
Type | Values Removed | Values Added |
---|---|---|
CPE | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | |
References | () https://git.kernel.org/stable/c/05ae1f0fe9c6c5ead08b306e665763a352d20716 - Patch | |
References | () https://git.kernel.org/stable/c/2a3e61de89bab6696aa28b70030eb119968c5586 - Patch | |
References | () https://git.kernel.org/stable/c/3c805fce07c9dbc47d8a9129c7c5458025951957 - Patch | |
References | () https://git.kernel.org/stable/c/fadead80fe4c033b5e514fcbadd20b55c4494112 - Patch | |
CVSS |
v2 : v3 : |
v2 : unknown
v3 : 4.7 |
CWE | CWE-362 | |
First Time |
Linux linux Kernel
Linux |
22 Aug 2024, 12:48
Type | Values Removed | Values Added |
---|---|---|
Summary |
|
22 Aug 2024, 04:15
Type | Values Removed | Values Added |
---|---|---|
New CVE |
Information
Published : 2024-08-22 04:15
Updated : 2025-06-19 13:15
NVD link : CVE-2022-48941
Mitre link : CVE-2022-48941
CVE.ORG link : CVE-2022-48941
JSON object : View
Products Affected
linux
- linux_kernel
CWE
CWE-362
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')