Memory corruption via cached-directory reference-count race
Published Dec 9, 2025 · Updated Aug 5, 2026
Use-after-free in the Linux kernel SMB client allows remote attackers to corrupt memory through a cached-directory reference-count race. A timing gap lets find_or_create_cached_dir() acquire a cached_fid reference after kref_put() reduces its count to zero but before smb2_close_cached_fid() takes cfid_list_lock. Exploitation requires an attacker-controlled or intercepted SMB server and routine directory activity on its mounted share; successful reuse can disclose or modify kernel memory or panic the host.
Summary
What happened
Use-after-free in the Linux kernel SMB client allows remote attackers to corrupt memory through a cached-directory reference-count race. A timing gap lets find_or_create_cached_dir() acquire a cached_fid reference after kref_put() reduces its count to zero but before smb2_close_cached_fid() takes cfid_list_lock. Exploitation requires an attacker-controlled or intercepted SMB server and routine directory activity on its mounted share; successful reuse can disclose or modify kernel memory or panic the host.
The record
- CVE
- CVE-2025-40328
- Published
- Dec 9, 2025
- Updated
- Aug 5, 2026
- Vendor
- The Linux Kernel Organization
- Product
- Linux
- Classifications
- T1203
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Dec 9, 2025CVE publishedPublication date reported by the CVE source.
- Aug 5, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=6.1
- Affected versionversion=ebe98f1447bbccf8228335c62d86af02a0ed23f7 <065bd62412271a2d734810dd50336cae88c54427
- Affected versionversion=ebe98f1447bbccf8228335c62d86af02a0ed23f7 <734e99623c5b65bf2c03e35978a0b980ebc3c2f8
- Affected versionversion=ebe98f1447bbccf8228335c62d86af02a0ed23f7 <bdb596ceb4b7c3f28786a33840263728217fbcf5
- Affected versionversion=ebe98f1447bbccf8228335c62d86af02a0ed23f7 <cb52d9c86d70298de0ab7c7953653898cbc0efd6
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo