CVE-2025-40039
BaseFortify
Publication date: 2025-10-28
Last updated on: 2026-02-26
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | From 5.15.145 (inc) to 5.16 (exc) |
| linux | linux_kernel | From 6.13 (inc) to 6.17.3 (exc) |
| linux | linux_kernel | From 6.1.71 (inc) to 6.2 (exc) |
| linux | linux_kernel | From 6.3 (inc) to 6.6.123 (exc) |
| linux | linux_kernel | From 6.7 (inc) to 6.12.53 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-362 | The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a race condition in the Linux kernel's ksmbd component related to the management of RPC handles within a session. The 'sess->rpc_handle_list' XArray is supposed to be protected by a read-write lock ('sess->rpc_lock'), but the locking was implemented incorrectly. Specifically, the code used a read lock when modifying the list, which requires a write lock, and in some cases accessed the list without any lock. This flaw could lead to data corruption or use-after-free errors due to concurrent access without proper synchronization.
How can this vulnerability impact me? :
The vulnerability can lead to data corruption or use-after-free conditions in the ksmbd session's RPC handle list. This can cause system instability, crashes, or potentially allow an attacker to execute arbitrary code or cause denial of service by exploiting the race condition in concurrent access to the RPC handle list.
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, update the Linux kernel to a version where the ksmbd race condition in RPC handle list access is fixed. The fix involves proper locking using down_write()/up_write() and down_read()/up_read() to protect the rpc_handle_list XArray. Until the update is applied, avoid using vulnerable ksmbd sessions that may trigger concurrent modifications to the rpc_handle_list.