Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25AFF384CC4 for ; Thu, 25 Jun 2026 08:47:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782377255; cv=none; b=TUIV0+lNT4YIrDhvPq1Am4wonNkHPJjb/bzDbkgf9tmSS/n9z/h7xS4IDli3H0kpqbik3/ieqjMcw8Xglx+aN2Yq/MCleNBAlkP3EKx0hnYT9bPJI9jLENetJDYI4sx/7H3p02IVcwLEfaCxrM7HV68rl/Tm/FjyXKMufsu5wdA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782377255; c=relaxed/simple; bh=doQLccRpdAq/s5AYgoryb00WICQWCljzZZaQH8mjJoU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZLHExArSqv8bIhzMMVvDsr8N4NeIwtOfsiWZpmyhaEGU0bpx7YhJebl8NqS/niFSnFPd39R4t8/LuWv8RiIl7wMQFqW8/bD9W2XJJGG8ciIjr66nl1XAfBOV/wUrFdphj/qWVn5vsqTO6BuWTpQJWpPiCs4hCcnSOxnC81y38Ok= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZNWB6A9M; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ZNWB6A9M" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 678A61F000E9; Thu, 25 Jun 2026 08:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1782377254; bh=WfiMp2fNPlIn/y9bdU41Umx5QEEaNpY2lXnpagdRYbI=; h=From:To:Cc:Subject:Date:Reply-To; b=ZNWB6A9MP9eJ2DgvI1J5Mc1Y5PZyVkTq0iOHhKYTMDMZ7bW4XLi/sUR1elNX+scz4 QbOX/RF6Z0dxNdGnKmRLKlpPHdiy8NlyE5CZfm8/J3QtsBmMGwDyNZ3O/kIht6Rhlj JcbvDcf97c7BwR/+DenFgf55Mayw+OMWXCYKhBMU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-53198: ksmbd: fix use-after-free of a deferred file_lock on double SMB2_CANCEL Date: Thu, 25 Jun 2026 09:40:46 +0100 Message-ID: <2026062559-CVE-2026-53198-8bc8@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3715; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WJ0jOLANmAzB7a016Rt78mdi6AIkRtFT8FHug6kVZuQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDFk2L+P/5orfu6v58aDwgynMz0wsbVTcj+rMMVfOvzVX9 fnLSUcXdsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEmB4xzNN8NXtq98wptvza e7c5rVdMKQ+79Y9hwYmjTJrJJ1S5P1yV917Q2nzzerabFwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix use-after-free of a deferred file_lock on double SMB2_CANCEL A deferred byte-range lock (an SMB2_LOCK that blocks) registers an async work on conn->async_requests via setup_async_work(), with cancel_fn = smb2_remove_blocked_lock and cancel_argv[0] pointing at the struct file_lock. When the request is cancelled, the worker frees the file_lock with locks_free_lock() and takes the cancelled early-exit, which "goto out"s and never reaches release_async_work() -- the only site that unlinks the work from conn->async_requests and clears cancel_fn/cancel_argv. The work therefore stays matchable on async_requests with a live cancel_fn pointing at the freed file_lock, until connection teardown finally runs release_async_work(). smb2_cancel() fires cancel_fn unconditionally with no state guard, so a second SMB2_CANCEL for the same AsyncId, arriving in that window, re-runs smb2_remove_blocked_lock() on the freed file_lock -- a slab use-after-free: BUG: KASAN: slab-use-after-free in __locks_delete_block __locks_delete_block locks_delete_block ksmbd_vfs_posix_lock_unblock smb2_remove_blocked_lock smb2_cancel <- 2nd SMB2_CANCEL fires cancel_fn handle_ksmbd_work Allocated by ...: locks_alloc_lock <- smb2_lock Freed by ...: locks_free_lock <- smb2_lock (cancelled branch) ... cache file_lock_cache of size 192 Reproduced on mainline with KASAN by an authenticated SMB client. Skip a work whose state is already KSMBD_WORK_CANCELLED so its cancel callback cannot be fired a second time. The Linux kernel CVE team has assigned CVE-2026-53198 to this issue. Affected and fixed versions =========================== Fixed in 6.1.176 with commit b7063c7426ea5a4d15e01b60538718765392f49d Fixed in 6.6.143 with commit 0da2e073f9cbf4985a0fd9acb71bc5ff599f8afd Fixed in 6.12.94 with commit 89ae9df09d2c1fb4a4eb495c113a7ce1dca34147 Fixed in 6.18.36 with commit 14d2eee0193ac3cd1bf3d014373449f0b8d35d6d Fixed in 7.0.13 with commit 2b2eda2821cff1d1b5a423b6ee7d8fc6fbc8e694 Fixed in 7.1 with commit f580d27e8928828693df44ba2db0fffdbe11dfea 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-53198 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/b7063c7426ea5a4d15e01b60538718765392f49d https://git.kernel.org/stable/c/0da2e073f9cbf4985a0fd9acb71bc5ff599f8afd https://git.kernel.org/stable/c/89ae9df09d2c1fb4a4eb495c113a7ce1dca34147 https://git.kernel.org/stable/c/14d2eee0193ac3cd1bf3d014373449f0b8d35d6d https://git.kernel.org/stable/c/2b2eda2821cff1d1b5a423b6ee7d8fc6fbc8e694 https://git.kernel.org/stable/c/f580d27e8928828693df44ba2db0fffdbe11dfea