CVE-2025-40328
smb: client: fix potential UAF in smb2_close_cached_fid()
Reported by linux · Published December 9, 2025
In the Linux kernel, the following vulnerability has been resolved: smb: client: fix potential UAF in smb2_close_cached_fid() find_or_create_cached_dir() could grab a new reference after kref_put() had seen the refcount drop to zero but before cfid_list_lock is acquired in smb2_close_cached_fid(), leading to use-after-free. Switch to kref_put_lock() so cfid_release() is called with cfid_list_lock held, closing that gap.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-livepatch-6.12.58-82.121 | Amazon Linux | 1:1.0-0.amzn2023 |
| kernel-headers | Amazon Linux | 1:6.1.163-186.299.amzn2023 |
| kernel6.12-headers | Amazon Linux | 1:6.12.58-82.121.amzn2023 |
| kernel-modules-extra-common | Amazon Linux | 1:6.1.163-186.299.amzn2023 |
| kernel6.12-libbpf-static | Amazon Linux | 1:6.12.58-82.121.amzn2023 |
| kernel6.12 | Amazon Linux | 1:6.12.58-82.121.amzn2023 |
| python3-perf6.12 | Amazon Linux | 1:6.12.58-82.121.amzn2023 |
| kernel6.12-modules-extra | Amazon Linux | 1:6.12.58-82.121.amzn2023 |
| perf | Amazon Linux | 1:6.1.163-186.299.amzn2023 |
| kernel6.12-libbpf | Amazon Linux | 1:6.12.58-82.121.amzn2023 |
| kernel-libbpf-devel | Amazon Linux | 1:6.1.163-186.299.amzn2023 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | ebe98f1447bbccf8228335c62d86af02a0ed23f7, ebe98f1447bbccf8228335c62d86af02a0ed23f7, ebe98f1447bbccf8228335c62d86af02a0ed23f7 |
| Linux | Linux | 6.1, 0, 6.1.191 |
| amazon:2023 | kernel-livepatch-6.12.58-82.121 | 0 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2023 | kernel6.12-headers | 0 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | kernel6.12-libbpf-static | 0 |
| amazon:2023 | kernel6.12 | 0 |
| amazon:2023 | python3-perf6.12 | 0 |
| amazon:2023 | kernel6.12-modules-extra | 0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel6.12-libbpf | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| linux | linux_kernel | 6.1, 6.1, 6.1 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | kernel | 0 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | kernel6.12-libbpf-devel | 0 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2023 | kernel-devel | 0 |
…and 12 more
Timeline
- Dec 8, 2025 CVE Published
- Dec 9, 2025 EPSS Score (30 in total, the first dated here)
- Mar 29, 2026 Distribution Patch (114 in total, the first dated here)
- Mar 29, 2026 Security Advisory (117 in total, the first dated here)
- Jun 8, 2026 Coalition ESS Score
- Jul 30, 2026 CVE Updated
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-40328
vulnetix vdb fixes CVE-2025-40328
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-40328/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart