CVE-2025-40328: smb: client: fix potential UAF in smb2_close_cached_fid()

Published Dec 9, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

smb: client: fix potential UAF in smb2closecachedfid()

findorcreatecacheddir() could grab a new reference after krefput() had seen the refcount drop to zero but before cfidlistlock is acquired in smb2closecachedfid(), leading to use-after-free.

Switch to krefputlock() so cfidrelease() is called with cfidlistlock held, closing that gap.

Affected Software

2 affected componentsFixes available
linux/kernel
Microsoft azl3 kernel 6.6.112.1-2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Apply the Linux kernel fix for the smb client: switch to kref_put_lock() so cfid_release() is called with cfid_list_lock held, and adjust smb2_close_cached_fid() to prevent the potential use-after-free described.

    Linux kernel (smb client) switch to kref_put_lock() in cfid_release() so cfid_release() is called with cfid_list_lock held = implemented

Event History

Dec 9, 2025
CVE Published
via MITRE·04:09 AM
Data Sourced
via MITRE·04:09 AM
DescriptionSeverity
Data Sourced
via NVD·04:17 PM
DescriptionSeverity
Dec 10, 2025
Data Sourced
via Microsoft·01:01 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·01:01 AM
DescriptionSeverity

Frequently Asked Questions

1

What is the severity of CVE-2025-40328?

CVE-2025-40328 has a moderate severity level due to its potential for a use-after-free vulnerability in the Linux kernel.

2

How do I fix CVE-2025-40328?

To fix CVE-2025-40328, update your Linux kernel to the latest version where the vulnerability has been patched.

3

Which versions of the Linux kernel are affected by CVE-2025-40328?

CVE-2025-40328 affects multiple versions of the Linux kernel prior to the patch release for this vulnerability.

4

What components are impacted by CVE-2025-40328?

CVE-2025-40328 specifically impacts the smb2_close_cached_fid() function within the Linux kernel's SMB client implementation.

5

Is there a workaround for CVE-2025-40328 if I cannot update?

Currently, no specific workaround is recommended for CVE-2025-40328, so updating the kernel is the best course of action.

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