CVE-2025-39819

fs/smb: Fix inconsistent refcnt update

No CVSS score yet EPSS 0.16%

Published 16 Sep 2025 Updated 5 Nov 2026 CNA: Linux

Check your servers for CVE-2025-39819

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-39819 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.

Check my servers

Description

In the Linux kernel, the following vulnerability has been resolved:

fs/smb: Fix inconsistent refcnt update

A possible inconsistent update of refcount was identified in `smb2_compound_op`. Such inconsistent update could lead to possible resource leaks.

Why it is a possible bug: 1. In the comment section of the function, it clearly states that the reference to `cfile` should be dropped after calling this function. 2. Every control flow path would check and drop the reference to `cfile`, except the patched one. 3. Existing callers would not handle refcount update of `cfile` if -ENOMEM is returned.

To fix the bug, an extra goto label "out" is added, to make sure that the cleanup logic would always be respected. As the problem is caused by the allocation failure of `vars`, the cleanup logic between label "finished" and "out" can be safely ignored. According to the definition of function `is_replayable_error`, the error code of "-ENOMEM" is not recoverable. Therefore, the replay logic also gets ignored.

Exploitation

EPSS 0.16%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 5.08% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 5 Nov 2026):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from a7d5c294628088781da9e91cbb034d61c3a71f71, before 3fc11ff13fbc2749871d6ac2141685cf54699997
affected from a7d5c294628088781da9e91cbb034d61c3a71f71, before 4191ea1f0bb3e27d65c5dcde7bd00e709ec67141
affected from a7d5c294628088781da9e91cbb034d61c3a71f71, before 4735f5991f51468b85affb8366b7067248457a71
affected from a7d5c294628088781da9e91cbb034d61c3a71f71, before cc82c6dff548f0066a51a6e577c7454e7d26a968
affected from a7d5c294628088781da9e91cbb034d61c3a71f71, before ab529e6ca1f67bcf31f3ea80c72bffde2e9e053e
Other versions: unaffected
Linux
affected 5.8
unaffected before 5.8
unaffected from 6.1.150 up to and including 6.1.*
unaffected from 6.6.104 up to and including 6.6.*
unaffected from 6.12.45 up to and including 6.12.*
unaffected from 6.16.5 up to and including 6.16.*
unaffected 6.17 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-39819 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-39819

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-39819
trivy image --scanners vuln IMAGE | grep CVE-2025-39819

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

Source: the record CVE-2025-39819 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.