Skip to contentSkip to conversation

CVE-2025-38437: ksmbd: fix potential use-after-free in oplock/lease break ack

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jul 25, 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 potential use-after-free in oplock/lease break ack

If ksmbd_iov_pin_rsp return error, use-after-free can happen by accessing opinfo->state and opinfo_put and ksmbd_fd_put could called twice.

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

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

	Fixed in 6.1.146 with commit e38ec88a2b42c494601b1213816d75f0b54d9bf0
	Fixed in 6.6.99 with commit 97c355989928a5f60b228ef5266c1be67a46cdf9
	Fixed in 6.12.39 with commit 815f1161d6dbc4c54ccf94b7d3fdeab34b4d7477
	Fixed in 6.15.7 with commit 8106adc21a2270c16abf69cd74ccd7c79c6e7acd
	Fixed in 6.16-rc6 with commit 50f930db22365738d9387c974416f38a06e8057e

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-38437

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/smb2pdu.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/e38ec88a2b42c494601b1213816d75f0b54d9bf0
	https://git.kernel.org/stable/c/97c355989928a5f60b228ef5266c1be67a46cdf9
	https://git.kernel.org/stable/c/815f1161d6dbc4c54ccf94b7d3fdeab34b4d7477
	https://git.kernel.org/stable/c/8106adc21a2270c16abf69cd74ccd7c79c6e7acd
	https://git.kernel.org/stable/c/50f930db22365738d9387c974416f38a06e8057e