CVE-2021-47026
RDMA/rtrs-clt: destroy sysfs after removing session from active list
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
In the Linux kernel, the following vulnerability has been resolved: RDMA/rtrs-clt: destroy sysfs after removing session from active list A session can be removed dynamically by sysfs interface "remove_path" that
eventually calls rtrs_clt_remove_path_from_sysfs function. The current
rtrs_clt_remove_path_from_sysfs first removes the sysfs interfaces and
frees sess->stats object. Second it removes the session from the active
list. Therefore some functions could access non-connected session and access the
freed sess->stats object even-if they check the session status before
accessing the session. For instance rtrs_clt_request and get_next_path_min_inflight check the
session status and try to send IO to the session. The session status
could be changed when they are trying to send IO but they could not catch
the change and update the statistics information in sess->stats object,
and generate use-after-free problem.
(see: "RDMA/rtrs-clt: Check state of the rtrs_clt_sess before reading its
stats") This patch changes the rtrs_clt_remove_path_from_sysfs to remove the
session from the active session list and then destroy the sysfs
interfaces. Each function still should check the session status because closing or
error recovery paths can change the status.
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: RDMA/rtrs-clt: destruye sysfs después de eliminar la sesión de la lista activa Una sesión se puede eliminar dinámicamente mediante la interfaz sysfs "remove_path" que eventualmente llama a la función rtrs_clt_remove_path_from_sysfs. El rtrs_clt_remove_path_from_sysfs actual primero elimina las interfaces sysfs y libera el objeto sess->stats. En segundo lugar, elimina la sesión de la lista activa. Por lo tanto, algunas funciones podrían acceder a sesiones no conectadas y acceder al objeto sess->stats liberado incluso si verifican el estado de la sesión antes de acceder a la sesión. Por ejemplo, rtrs_clt_request y get_next_path_min_inflight verifican el estado de la sesión e intentan enviar IO a la sesión. El estado de la sesión podría cambiarse cuando intentan enviar IO pero no pudieron detectar el cambio y actualizar la información estadística en el objeto sess->stats, y generar un problema de use-after-free. (ver: "RDMA/rtrs-clt: Verifique el estado de rtrs_clt_sess antes de leer sus estadísticas") Este parche cambia rtrs_clt_remove_path_from_sysfs para eliminar la sesión de la lista de sesiones activas y luego destruir las interfaces sysfs. Cada función aún debe verificar el estado de la sesión porque el cierre o las rutas de recuperación de errores pueden cambiar el estado.
In the Linux kernel, the following vulnerability has been resolved: RDMA/rtrs-clt: destroy sysfs after removing session from active list A session can be removed dynamically by sysfs interface "remove_path" that eventually calls rtrs_clt_remove_path_from_sysfs function. The current rtrs_clt_remove_path_from_sysfs first removes the sysfs interfaces and frees sess->stats object. Second it removes the session from the active list. Therefore some functions could access non-connected session and access the freed sess->stats object even-if they check the session status before accessing the session. For instance rtrs_clt_request and get_next_path_min_inflight check the session status and try to send IO to the session. The session status could be changed when they are trying to send IO but they could not catch the change and update the statistics information in sess->stats object, and generate use-after-free problem. (see: "RDMA/rtrs-clt: Check state of the rtrs_clt_sess before reading its stats") This patch changes the rtrs_clt_remove_path_from_sysfs to remove the session from the active session list and then destroy the sysfs interfaces. Each function still should check the session status because closing or error recovery paths can change the status.
CVSS Scores
SSVC
- Decision:Track
Timeline
- 2024-02-27 CVE Reserved
- 2024-02-28 CVE Published
- 2024-12-19 CVE Updated
- 2025-01-10 EPSS Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
CAPEC
References (5)
URL | Tag | Source |
---|---|---|
https://git.kernel.org/stable/c/6a98d71daea186247005099758af549e6afdd244 | Vuln. Introduced |
URL | Date | SRC |
---|
URL | Date | SRC |
---|
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.8 < 5.10.37 Search vendor "Linux" for product "Linux Kernel" and version " >= 5.8 < 5.10.37" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 5.8 < 5.11.21 Search vendor "Linux" for product "Linux Kernel" and version " >= 5.8 < 5.11.21" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 5.8 < 5.12.4 Search vendor "Linux" for product "Linux Kernel" and version " >= 5.8 < 5.12.4" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 5.8 < 5.13 Search vendor "Linux" for product "Linux Kernel" and version " >= 5.8 < 5.13" | en |
Affected
|