CVE-2025-22040: ksmbd: fix session use-after-free in multichannel connection

Published Apr 16, 2025
·
Updated

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

7 affected components
Linux Linux kernel
Linux Linux kernel>=5.15<6.1.134
Linux Linux kernel>=6.2<6.6.87
Linux Linux kernel>=6.7<6.12.23
Linux Linux kernel>=6.13<6.13.11
Linux Linux kernel>=6.14<6.14.2
Debian Debian Linux=11.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. 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

Apr 16, 2025
CVE Published
via MITRE·02:11 PM
Data Sourced
via MITRE·02:11 PM
DescriptionSeverity
Data Sourced
via NVD·03:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jul 11, 2025
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203