Skip to contentSkip to conversation

CVE-2025-39720: ksmbd: fix refcount leak causing resource not released

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 5, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

ksmbd: fix refcount leak causing resource not released

When ksmbd_conn_releasing(opinfo->conn) returns true,the refcount was not decremented properly, causing a refcount leak that prevents the count from reaching zero and the memory from being released.

The Linux kernel CVE team has assigned CVE-2025-39720 to this issue.

Affected and fixed versions
===========================

	Fixed in 6.6.103 with commit a1d2bab4d53368a526c97aba92671dd71814f95a
	Fixed in 6.12.44 with commit 36e010bb865fbaa1202fe9bcce3fd486d6db7606
	Fixed in 6.16.4 with commit 9a7abce6e8c0e2145b346a6d4abf0d9655e9b0e8
	Fixed in 6.17-rc3 with commit 89bb430f621124af39bb31763c4a8b504c9651e2

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2025-39720

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
fs/smb/server/oplock.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/a1d2bab4d53368a526c97aba92671dd71814f95a
	https://git.kernel.org/stable/c/36e010bb865fbaa1202fe9bcce3fd486d6db7606
	https://git.kernel.org/stable/c/9a7abce6e8c0e2145b346a6d4abf0d9655e9b0e8
	https://git.kernel.org/stable/c/89bb430f621124af39bb31763c4a8b504c9651e2