CVE-2025-22040: ksmbd: fix session use-after-free in multichannel connection
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix session use-after-free in multichannel connection
There is a race condition between session setup and ksmbdsessionsderegister. The session can be freed before the connection is added to channel list of session. This patch check reference count of session before freeing it.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Apply the described fix that checks the reference count of the session before freeing it to address the use-after-free race between session setup and session deregistration in multichannel connections (ksmbd_sessions_deregister).
Event History
Frequently Asked Questions
What is the severity of CVE-2025-22040?
CVE-2025-22040 is classified as a medium severity vulnerability due to the potential for a race condition affecting session management.
How do I fix CVE-2025-22040?
To fix CVE-2025-22040, you should update your Linux kernel to the latest patched version that addresses this vulnerability.
What impact does CVE-2025-22040 have on system security?
CVE-2025-22040 can lead to session instability or unauthorized access if exploited, affecting the security of the affected system.
Which versions of the Linux kernel are affected by CVE-2025-22040?
CVE-2025-22040 affects specific versions of the Linux kernel, particularly those prior to the fix being applied as per the updates.
Is CVE-2025-22040 exploitable remotely?
CVE-2025-22040 could potentially be exploited remotely, depending on the specific configurations and use of ksmbd in the Linux environment.