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 C36134EFFA6 for ; Thu, 17 Sep 2026 16:20:04 +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=1789662006; cv=none; b=O2qsF+D1rXK5/L2DVFnDzXeNdKt7Yr2E9jwypFgyCKNF9wYtW93RpmUpW13VwccTDt/MK61I93h4yBRjGKRGd3EtDyNTJyB854jYLXWSRSM0EZkXPmLczT8+kaR20l36d2+aUSk9FFjEqnxgDVkydC41v/9XC0HisWRszwlBPP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789662006; c=relaxed/simple; bh=fKTlQyYbNpk3etrxWIXgE/MXERtuNRWhs8+iXnNSNFM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gQxGVDdtyF+EYGaRGT7nC2BrYDLPnwpcUI35p09pW2fq62FAM0+I2qdlpgSo28vK4H/ryrOeCo8R+o0PRGOWkDSpilNoHVuOau1rKEEK7/oOFizW9DRP7htM466qzBrOdArrX3JouUPflGW0wuPjTPHfBUbxbosp8OWCNSzd2qw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ODw3V0Nt; 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="ODw3V0Nt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D04C11F000FF; Thu, 17 Sep 2026 16:20:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789662004; bh=Y6zJGDqZ6UEdCNe/vSZSOkvbU76nZQEouIdmepefHbQ=; h=From:To:Cc:Subject:Date:Reply-To; b=ODw3V0NtvwbzZDNhfDzMwYpNCEcAhhP9uACqbxNBKEcSjX+uF6LcLnBz7gELDGnJa yR6AhprujNN6mVxEkrZzgn6wccshQacnh7kkRXsONOlfuz8u3wLuQWM4Ao4Dizxs8B 6RYasa+cNxi3U1u0oqmZDeUU9Rj1VVL+LQ9aEB5M= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-90162: ksmbd: defer publishing granted locks to prevent UAF/double-free race Date: Thu, 17 Sep 2026 17:09:52 +0100 Message-ID: <2026091726-CVE-2026-90162-8510@gregkh> X-Mailer: git-send-email 2.55.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=2935; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=kZJR8bP2tH7VPANIPxw2UXfZJnQdjWSTR/IuHpM9Af0=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlrBKrUeX52xuldlwyu2jBXs4d155uzs/+7u2yd4fa3U j8vcrlRRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExE8xjDgiPn31knfBB4KmL2 iD/i1QzOS0ddGRkWrF/H/XnVgx/2/i8nSUS2/NnWmPBYEAA= 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: defer publishing granted locks to prevent UAF/double-free race In smb2_lock(), mid-batch granted locks are published to connection-wide (conn->lock_list) and file-wide (fp->lock_list) lists immediately upon vfs_lock_file() success, while also remaining tracked on the stack-local rollback_list. If a subsequent element in the same SMB2_LOCK request array fails validation or execution, the thread jumps to out: and walks rollback_list to undo previously granted locks. However, because the granted lock was already published to conn->lock_list, a concurrent UNLOCK request on the same connection can find the lock object and kfree() it before the rollback loop executes. When the granting thread subsequently walks rollback_list, it dereferences and frees the already-freed ksmbd_lock structure, resulting in a Use-After-Free and Double-Free (on both ksmbd_lock and struct file_lock). Fix this by deferring the publication of granted locks to conn->lock_list and fp->lock_list until after the entire array of lock elements has been processed without error. Mid-batch grants remain tracked exclusively on the request-local rollback_list until the whole batch succeeds, eliminating the race window. The Linux kernel CVE team has assigned CVE-2026-90162 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 and fixed in 7.2.6 with commit a1d26dfb32919088e3638dca01068df3c4507433 Issue introduced in 5.15 with commit e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 and fixed in 7.3-rc1 with commit 29f74f0f2e6df3b393b7b66e810136d0c64e3c59 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-90162 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/a1d26dfb32919088e3638dca01068df3c4507433 https://git.kernel.org/stable/c/29f74f0f2e6df3b393b7b66e810136d0c64e3c59