CVE-2025-39819

fs/smb: Fix inconsistent refcnt update

MEDIUM
5.5
CVSS Score
Published: September 16, 2025 at 01:00 PM UTC
Updated: October 19, 2026 at 09:10 PM UTC
3 products affected across 3 vendorsLinux KernelDebian LinuxSIMATIC CN 4100

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.1%

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.8 ≤ v < 6.1.1506.13 ≤ v < 6.16.56.2 ≤ v < 6.6.1046.7 ≤ v < 6.12.455.86.176.17 rc16.17 rc26.17 rc3a7d5c294628088781da9e91cbb034d61c3a71f71
Vendor states this is fixed in 3fc11ff13fbc2749871d6ac2141685cf54699997 (fixed)
Vendor states this is fixed in 4191ea1f0bb3e27d65c5dcde7bd00e709ec67141 (fixed)
Vendor states this is fixed in 4735f5991f51468b85affb8366b7067248457a71 (fixed)
Vendor states this is fixed in ab529e6ca1f67bcf31f3ea80c72bffde2e9e053e (fixed)
Vendor states this is fixed in cc82c6dff548f0066a51a6e577c7454e7d26a968 (fixed)
Vendor states this is fixed in 5.8 (unaffected)
Vendor states this is fixed in 6.1.150 (unaffected)
Vendor states this is fixed in 6.12.45 (unaffected)
Vendor states this is fixed in 6.16.5 (unaffected)
Vendor states this is fixed in 6.17 (unaffected)
Vendor states this is fixed in 6.6.104 (unaffected)
v < V5.0
Affected range stops below V5.0, so it looks safe — our inference, not a vendor statement

References (7)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/3fc11ff13fbc2749871d6ac2141685cf54699997
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/4191ea1f0bb3e27d65c5dcde7bd00e709ec67141
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/4735f5991f51468b85affb8366b7067248457a71
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ab529e6ca1f67bcf31f3ea80c72bffde2e9e053e
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/cc82c6dff548f0066a51a6e577c7454e7d26a968
Third Party Advisory
Source: af854a3a-2127-422b-91ae-364da2661108
https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html
Source: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
https://cert-portal.siemens.com/productcert/html/ssa-032379.html

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card