CVE-2026-98450: smb: client: close completed creates on compound wait errors
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
smb: client: close completed creates on compound wait errors
compound_send_recv() waits for responses in order. If a later wait is interrupted, or if a later MID fails during response synchronization, an earlier CREATE may already have opened a remote handle. The earlier mid is then released without invoking handle_cancelled_mid(), leaving the remote handle open because no FID was copied to the caller.
Mark completed earlier mids as cancelled when a compound wait or MID synchronization aborts. Keep their response buffers attached while the MIDs are synchronized, and transfer them only after synchronization of the processed responses, so the release path can inspect successful CREATE responses and queue SMB2_close() after a later failure. Account for a remote open only after the close work is allocated and before it is queued, since the caller has not yet updated num_remote_opens. Mark the create+close compound used by smb2_unlink() so it is not closed again. Non-CREATE responses and compounds that already include a close keep their existing behavior.
The Linux kernel CVE team has assigned CVE-2026-98450 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.19 with commit e0bba0b8548179b696e86c158ea8f45f2ef6ad14 and fixed in 6.12.113 with commit 2cb07d1a6a30283dbfc809c8036bc1fd103d59fa Issue introduced in 4.19 with commit e0bba0b8548179b696e86c158ea8f45f2ef6ad14 and fixed in 6.18.56 with commit 224b56b7c02b2bfb1f5bee18d5f56ae6b052be44 Issue introduced in 4.19 with commit e0bba0b8548179b696e86c158ea8f45f2ef6ad14 and fixed in 7.2.9 with commit 253612499ce9b4cd7bb922fe507ec204bddd9313 Issue introduced in 4.19 with commit e0bba0b8548179b696e86c158ea8f45f2ef6ad14 and fixed in 7.3-rc5 with commit 6c5c547f037bc18f0b8d0b5db5a648f8f630ce85
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-98450
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/client/smb2inode.c
fs/smb/client/smb2misc.c
fs/smb/client/transport.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/2cb07d1a6a30283dbfc809c8036bc1fd103d59fa https://git.kernel.org/stable/c/224b56b7c02b2bfb1f5bee18d5f56ae6b052be44 https://git.kernel.org/stable/c/253612499ce9b4cd7bb922fe507ec204bddd9313 https://git.kernel.org/stable/c/6c5c547f037bc18f0b8d0b5db5a648f8f630ce85