Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793187783; b=tBUH7yQnxKZIUVvN0lIu43Wm3fnwORG4FxsnAk2Zbttc6SIY8NSg4dWQjAG8udkrSoZJ W3d0QNgdAS6IKRhGN+twDE4xeob4RcoioeH8YGpLbLIv5nkhloOYNXki+bSivFFUfj5US H7Zi1izJKhjNfXtz4ggf0oRdZpPnIEHq6IrUaDLJgQzos78DwegLvJ276lwTtDN0UUPq4 74vEunf7qzmEpF19wRWioGqhegBw65NspJLFpG7nNLmr5SeN1sqMN1DRv2bHk2ODov8Si a68TXistCU92mRaivSSX0mgmFSKopzGcbTXVF0FB1sGKY2X6+xgnTlBgk+eb1iXvWjA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793187783; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=4Il3LrwpmPiU2dk8DGb0VMfBuyFAtZ5sFaJVNPWGnPY=; b=XWS98a8x22SeZEe/y8gZRAy1opLZzZzpkn5F8vw2sW7fAbtLCN1q65OSfrAnpL29L+VR cBusqlckGpTNxDmj4WrE42GdHGi1HcA/MSwaU8Ub+I6w4zzHpPFvcvMsUo7nwiyGvcjrz FXqZyMbWa3zFvUAvJD2x3exDHdofQpp1ynoBcaxm92Xqy7LPATQUZCrHbef/RVDKhx/jo lmTlF9Qq+BDYGousUE8Wg6rsTahKTBS4pWYiGe4vLZAcUaJBzkVjNKfT0AIlQgcK9C7Ff R2QPro+MKbiQsP3EAQRniRCbgb33dPpD5Xv61TmgcUa23Gqt4OZdwg08H4l82sMDzFw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=pLnQQ2xb; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B19D9606A320 for ; Wed, 28 Oct 2026 11:43:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=pLnQQ2xb Received: by smtp.kernel.org (Postfix) with ESMTPSA id E581D1F01825; Wed, 28 Oct 2026 11:43:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1793187782; bh=4Il3LrwpmPiU2dk8DGb0VMfBuyFAtZ5sFaJVNPWGnPY=; h=From:To:Cc:Subject:Date:Reply-To; b=pLnQQ2xbZl5f81dgGTCFesrxMQEv6RzSzU8lakoBMElG8WjTJGgyXjJPuglhv0fbz 7QHuYqW1eJ74Stqobb2foh6f3jkIen6p6yDci7tEfpSYXb1F9Jxq4KOgQexBZrSM1y NKGgeYrNy7kP5YKPHyK1DdlAEgaofauo9wgYhxQ8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99207: scsi: target: Disable interrupts while holding delayed_cmd_lock Date: Wed, 28 Oct 2026 11:36:34 +0100 Message-ID: <2026102815-CVE-2026-99207-ea6e@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4632; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=NJ+a/0hE+Fra5+O3K3H6QaOoS5q7S+YK2wcaJS55mJE=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkPzz/e+OaFq9s6kw2thm0S18U1su5u5a1rT/K+JCHHw v1KMVO1I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACayt51hwV7eWwZNSzZFvFJ4 nypZ+NR0g1rlOYb5voeTvgpu5Z0uUxIZ4xc5h3dn19u9AA== 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: scsi: target: Disable interrupts while holding delayed_cmd_lock target_do_delayed_work() takes dev->delayed_cmd_lock with a plain spin_lock(). It runs from system_percpu_wq, so interrupts stay enabled while the lock is held. Every other acquisition of that lock uses spin_lock_irqsave(): target_handle_task_attr() and transport_complete_ordered_sync() in target_core_transport.c, and target_non_ordered_release() in target_core_device.c. That was safe while every caller of transport_complete_task_attr() ran in process context: target_complete_ok_work() from target_completion_wq, transport_complete_qf() from dev->qf_work_queue, and transport_generic_request_failure() from the submit and execute paths. Since commit 06933066d88a ("scsi: target: Add support for completing commands from backend context") that is no longer true. With complete_type=1 on a fabric that sets direct_compl_supp, target_complete() runs target_complete_ok_work() inline in the backend's completion context, which target_complete_cmd_with_sense() documents as "May be called from interrupt context". For iblock that is the bio end_io. target_complete_ok_work() starts with transport_complete_task_attr(), which takes delayed_cmd_lock in two ways: - Every ORDERED command is put on dev->delayed_cmd_list by target_handle_task_attr() and dispatched from there by target_do_delayed_work(), which marks it SCF_TASK_ORDERED_SYNC. Its completion therefore goes through transport_complete_ordered_sync(). - A SIMPLE command that completes while an ORDERED command is pending drops the last reference to the killed dev->non_ordered, and percpu_ref_put() then runs target_non_ordered_release() in the completing context. Both take the lock and, if commands are waiting, call schedule_work(&dev->delayed_cmd_work), which queues on system_percpu_wq, i.e. on the CPU that took the completion. Further completions for the same queue are typically delivered there too, so one arriving while the work holds the lock spins on it forever. Reaching this needs complete_type=1, which is not the default (vhost-scsi, the only fabric with direct_compl_supp, defaults to TARGET_QUEUE_COMPL), a backend whose I/O completes from interrupt context, and ORDERED commands from the initiator. Linux virtio_scsi guests send only VIRTIO_SCSI_S_SIMPLE and never take the ordered path; any guest that uses the ORDERED task attribute, which vhost-scsi accepts, does. target_do_delayed_work() is a work item and always runs in process context, so spin_lock_irq() is sufficient. Found by inspection; no runtime report. A single ORDERED command goes through both acquisitions, so with CONFIG_PROVE_LOCKING the first one completed through direct completion should produce an inconsistent lock state report on delayed_cmd_lock (hardirq or softirq, depending on where the backend completes). The Linux kernel CVE team has assigned CVE-2026-99207 to this issue. Affected and fixed versions =========================== Issue introduced in 7.1 with commit 06933066d88a3093953b062922c016a67d2cdbf8 and fixed in 7.2.13 with commit 7563650522732041ccfb2e4593878b5ea98d498c Issue introduced in 7.1 with commit 06933066d88a3093953b062922c016a67d2cdbf8 and fixed in 7.3 with commit 04a67a8b1a4460345d22fe75d93430cbf7e651d7 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-99207 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: drivers/target/target_core_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/7563650522732041ccfb2e4593878b5ea98d498c https://git.kernel.org/stable/c/04a67a8b1a4460345d22fe75d93430cbf7e651d7