CVE-2025-40039
Gravedad CVSS v3.1:
MEDIA
Tipo:
CWE-362
Ejecución concurrente utilizando recursos compartidos con una incorrecta sincronización (Condición de carrera)
Fecha de publicación:
28/10/2025
Última modificación:
26/02/2026
Descripción
*** Pendiente de traducción *** In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
ksmbd: Fix race condition in RPC handle list access<br />
<br />
The &#39;sess->rpc_handle_list&#39; XArray manages RPC handles within a ksmbd<br />
session. Access to this list is intended to be protected by<br />
&#39;sess->rpc_lock&#39; (an rw_semaphore). However, the locking implementation was<br />
flawed, leading to potential race conditions.<br />
<br />
In ksmbd_session_rpc_open(), the code incorrectly acquired only a read lock<br />
before calling xa_store() and xa_erase(). Since these operations modify<br />
the XArray structure, a write lock is required to ensure exclusive access<br />
and prevent data corruption from concurrent modifications.<br />
<br />
Furthermore, ksmbd_session_rpc_method() accessed the list using xa_load()<br />
without holding any lock at all. This could lead to reading inconsistent<br />
data or a potential use-after-free if an entry is concurrently removed and<br />
the pointer is dereferenced.<br />
<br />
Fix these issues by:<br />
1. Using down_write() and up_write() in ksmbd_session_rpc_open()<br />
to ensure exclusive access during XArray modification, and ensuring<br />
the lock is correctly released on error paths.<br />
2. Adding down_read() and up_read() in ksmbd_session_rpc_method()<br />
to safely protect the lookup.
Impacto
Puntuación base 3.x
4.70
Gravedad 3.x
MEDIA
Productos y versiones vulnerables
| CPE | Desde | Hasta |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.15.145 (incluyendo) | 5.16 (excluyendo) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.1.71 (incluyendo) | 6.2 (excluyendo) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.3 (incluyendo) | 6.6.123 (excluyendo) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (incluyendo) | 6.12.53 (excluyendo) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.13 (incluyendo) | 6.17.3 (excluyendo) |
Para consultar la lista completa de nombres de CPE con productos y versiones, ver esta página
Referencias a soluciones, herramientas e información
- https://git.kernel.org/stable/c/305853cce379407090a73b38c5de5ba748893aee
- https://git.kernel.org/stable/c/5cc679ba0f4505936124cd4179ba66bb0a4bd9f3
- https://git.kernel.org/stable/c/69674b029002b1d90b655f014bdf64f404efa54d
- https://git.kernel.org/stable/c/6b615a8fb3af0baf8126cde3d4fee97d57222ffc
- https://git.kernel.org/stable/c/6bd7e0e55dcea2cf0d391bbc21c2eb069b4be3e1



