CVE-2025-40268
cifs: client: fix memory leak in smb3_fs_context_parse_param
Reported by linux · Published December 6, 2025
In the Linux kernel, the following vulnerability has been resolved: cifs: client: fix memory leak in smb3_fs_context_parse_param The user calls fsconfig twice, but when the program exits, free() only frees ctx->source for the second fsconfig, not the first. Regarding fc->source, there is no code in the fs context related to its memory reclamation. To fix this memory leak, release the source memory corresponding to ctx or fc before each parsing. syzbot reported: BUG: memory leak unreferenced object 0xffff888128afa360 (size 96): backtrace (crc 79c9c7ba): kstrdup+0x3c/0x80 mm/util.c:84 smb3_fs_context_parse_param+0x229b/0x36c0 fs/smb/client/fs_context.c:1444 BUG: memory leak unreferenced object 0xffff888112c7d900 (size 96): backtrace (crc 79c9c7ba): smb3_fs_context_fullpath+0x70/0x1b0 fs/smb/client/fs_context.c:629 smb3_fs_context_parse_param+0x2266/0x36c0 fs/smb/client/fs_context.c:1438
EPSS 0.21% · 11.0th percentile
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| python3-perf6.12 | Amazon Linux | 1:6.12.63-84.121.amzn2023 |
| kernel6.12-tools-devel | Amazon Linux | 1:6.12.63-84.121.amzn2023 |
| kernel6.12-libbpf | Amazon Linux | 1:6.12.63-84.121.amzn2023 |
| kernel6.12-headers | Amazon Linux | 1:6.12.63-84.121.amzn2023 |
| kernel6.12-modules-extra | Amazon Linux | 1:6.12.63-84.121.amzn2023 |
| kernel6.12-tools | Amazon Linux | 1:6.12.63-84.121.amzn2023 |
| kernel6.12-devel | Amazon Linux | 1:6.12.63-84.121.amzn2023 |
| kernel6.12-libbpf-static | Amazon Linux | 1:6.12.63-84.121.amzn2023 |
| bpftool6.12 | Amazon Linux | 1:6.12.63-84.121.amzn2023 |
| kernel6.12-libbpf-devel | Amazon Linux | 1:6.12.63-84.121.amzn2023 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | af1a3d2ba9543e99d78914d8fb88b61d0531d9a1, af1a3d2ba9543e99d78914d8fb88b61d0531d9a1, af1a3d2ba9543e99d78914d8fb88b61d0531d9a1 |
| Linux | Linux | 5.11, 0, 6.1.191 |
| amazon:2023 | python3-perf6.12 | 0 |
| amazon:2023 | kernel6.12-tools-devel | 0 |
| amazon:2023 | kernel6.12-libbpf | 0 |
| amazon:2023 | kernel6.12-headers | 0 |
| amazon:2023 | kernel6.12-modules-extra | 0 |
| amazon:2023 | kernel6.12-tools | 0 |
| amazon:2023 | kernel6.12-devel | 0 |
| amazon:2023 | kernel6.12-libbpf-static | 0 |
| amazon:2023 | bpftool6.12 | 0 |
| amazon:2023 | kernel6.12-libbpf-devel | 0 |
| linux | linux_kernel | 5.11, 5.11, 5.11 |
| Linux | Linux | 6.6.117, 6.12.59, 6.17.9 |
| amazon:2023 | kernel6.12-modules-extra-common | 0 |
| amazon:2023 | kernel6.12 | 0 |
| amazon:2023 | perf6.12 | 0 |
| amazon:2023 | kernel-livepatch-6.12.63-84.121 | 0 |
Timeline
- Dec 6, 2025 CVE Published
- Dec 7, 2025 EPSS Score (30 in total, the first dated here)
- Mar 29, 2026 Security Advisory (204 in total, the first dated here)
- Mar 29, 2026 Distribution Patch (166 in total, the first dated here)
- Jun 8, 2026 Coalition ESS Score
- Jun 17, 2026 CVE Updated
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-40268
vulnetix vdb fixes CVE-2025-40268
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-40268/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart