VDB

CVE-2025-40268

CVE-2025-40268 PUBLISHED

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.

PackageEcosystemFixed in
python3-perf6.12Amazon Linux1:6.12.63-84.121.amzn2023
kernel6.12-tools-develAmazon Linux1:6.12.63-84.121.amzn2023
kernel6.12-libbpfAmazon Linux1:6.12.63-84.121.amzn2023
kernel6.12-headersAmazon Linux1:6.12.63-84.121.amzn2023
kernel6.12-modules-extraAmazon Linux1:6.12.63-84.121.amzn2023
kernel6.12-toolsAmazon Linux1:6.12.63-84.121.amzn2023
kernel6.12-develAmazon Linux1:6.12.63-84.121.amzn2023
kernel6.12-libbpf-staticAmazon Linux1:6.12.63-84.121.amzn2023
bpftool6.12Amazon Linux1:6.12.63-84.121.amzn2023
kernel6.12-libbpf-develAmazon Linux1:6.12.63-84.121.amzn2023

Risk scores

EPSS Score
0.21%
11.0th percentile

Affected products

VendorProductVersions
LinuxLinuxaf1a3d2ba9543e99d78914d8fb88b61d0531d9a1, af1a3d2ba9543e99d78914d8fb88b61d0531d9a1, af1a3d2ba9543e99d78914d8fb88b61d0531d9a1
LinuxLinux5.11, 0, 6.1.191
amazon:2023python3-perf6.120
amazon:2023kernel6.12-tools-devel0
amazon:2023kernel6.12-libbpf0
amazon:2023kernel6.12-headers0
amazon:2023kernel6.12-modules-extra0
amazon:2023kernel6.12-tools0
amazon:2023kernel6.12-devel0
amazon:2023kernel6.12-libbpf-static0
amazon:2023bpftool6.120
amazon:2023kernel6.12-libbpf-devel0
linuxlinux_kernel5.11, 5.11, 5.11
LinuxLinux6.6.117, 6.12.59, 6.17.9
amazon:2023kernel6.12-modules-extra-common0
amazon:2023kernel6.120
amazon:2023perf6.120
amazon:2023kernel-livepatch-6.12.63-84.1210

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

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›