Skip to contentSkip to conversation

CVE-2026-90155: ksmbd: detach blocked lock requests before freeing

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 17

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: detach blocked lock requests before freeing

A file_lock retained by ksmbd for byte-range lock bookkeeping can still be part of the VFS blocked-request graph. In particular, the VFS can chain a new waiter below an already blocked request through flc_blocked_requests. The ksmbd_file reference count does not cover that graph.

Both __ksmbd_close_fd() and the cross-request unlock path free these retained file_lock objects directly. If a dependent waiter is still attached, locks_release_private() hits BUG_ON(!list_empty(&flc->flc_blocked_requests)). The same lifetime mismatch can leave a freed ksmbd_lock reachable through its request-local llist.

Detach the file_lock from the blocked-request graph before freeing it in the close, cross-request unlock, and rollback paths. locks_delete_block() also wakes requests chained below the object. Remove llist when a completed lock is published so a globally visible ksmbd_lock no longer points into the submitting worker's stack.

The Linux kernel CVE team has assigned CVE-2026-90155 to this issue.

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

	Issue introduced in 5.15 with commit d63528eb0d43c4796c42aad56889dec12cf4e122 and fixed in 7.2.6 with commit 514a0b2bc949963497e66cacd433f65dc768a71d
	Issue introduced in 5.15 with commit d63528eb0d43c4796c42aad56889dec12cf4e122 and fixed in 7.3-rc1 with commit 215e8816b1ac25176d911abb8704390413ccee4b

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-2026-90155

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
fs/smb/server/vfs_cache.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/514a0b2bc949963497e66cacd433f65dc768a71d
	https://git.kernel.org/stable/c/215e8816b1ac25176d911abb8704390413ccee4b