CVE-2025-39819 fs/smb: Fix inconsistent refcnt update

Medium 5.5 Published Updated

An inconsistent reference count update in the Linux kernel SMB filesystem can cause resource leaks, potentially leading to denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-39819?

CVE-2025-39819 is a medium-severity denial of service vulnerability in Debian Debian Linux, published on 16 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.

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

Which versions are affected by CVE-2025-39819?

It affects 2 products.

Products include Debian Debian Linux, Linux kernel.

How do I fix CVE-2025-39819?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-39819 being exploited?

There is no known exploitation of CVE-2025-39819 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as AZL-67377, BELL-CVE-2025-39819, DEBIAN-CVE-2025-39819, GHSA-96wc-h5c4-3f6j, ROOT-OS-DEBIAN-11-CVE-2025-39819, ROOT-OS-UBUNTU-2204-CVE-2025-39819 and 2 more.

Is CVE-2025-39819 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free