CVE-2025-40286
smb/server: fix possible memory leak in smb2_read()
Check your servers for CVE-2025-40286
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-40286 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
smb/server: fix possible memory leak in smb2_read()
Memory leak occurs when ksmbd_vfs_read() fails. Fix this by adding the missing kvfree().
Exploitation
EPSS 0.20%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 10.2% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, before 0797c6cf3b857cc229ab2bc69552938dcd738d78 affected from e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, before 63d8706a2c09a0c29b8b0e8a44bc7a1339685de9 affected from e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, before f1305587731886da37a214cda812ade246c653b0 affected from e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, before bfda5422a16651d0bf864ec468b1c216e1b10d91 affected from e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, before 6fced056d2cc8d01b326e6fcfabaacb9850b71a4
Other versions: unaffected
|
| Linux |
affected 5.15 unaffected before 5.15 unaffected from 6.1.159 up to and including 6.1.* unaffected from 6.6.117 up to and including 6.6.* unaffected from 6.12.59 up to and including 6.12.* unaffected from 6.17.9 up to and including 6.17.* unaffected 6.18 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-40286 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-40286
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-40286
trivy image --scanners vuln IMAGE | grep CVE-2025-40286
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/0797c6cf3b857cc229ab2bc69552938dcd738d78 git.kernel.org
- https://git.kernel.org/stable/c/63d8706a2c09a0c29b8b0e8a44bc7a1339685de9 git.kernel.org
- https://git.kernel.org/stable/c/f1305587731886da37a214cda812ade246c653b0 git.kernel.org
- https://git.kernel.org/stable/c/bfda5422a16651d0bf864ec468b1c216e1b10d91 git.kernel.org
- https://git.kernel.org/stable/c/6fced056d2cc8d01b326e6fcfabaacb9850b71a4 git.kernel.org
Source: the record CVE-2025-40286 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse