From mboxrd@z Thu Jan 1 00:00:00 1970 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 727CF3DDDA1 for ; Wed, 27 May 2026 12:21:52 +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=1779884514; cv=none; b=i09HtAss+qKi9zrUVRVrEB2OXdJzpOlVU5hNZNFGeVawlo1FmshoqZ2HGuml7Y/3y1qQMbk7qAAxF/cNbCul3jx4DzZjSJlbqCWrHg6bEtM+ydUOflS/UceokFmA+E6pRTVBcBTGGOWXqzLSyykKXyDN2iK8mboKz4J4rBCDDr0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779884514; c=relaxed/simple; bh=6Xi3pu7xXuKv5WswN+2YnASnaCxjsFyWqqIu5/5MdKg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=stat7e2/2AXd0Tl+2/B4XHzL84a52m1CPZtm0nOeb6m32l+3XC5+pqfRdXUDrbbXpBigqJ1zEox3pD8Kr3F1qJPj/6KOIP6GAMPllUcCX/O5fMCHN3aXC8akXpTQ5jYSrGsPfr+DM4EVI2XBCYUF1ZGIeunAKltuTqFYf7nsios= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ecONLn0G; 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="ecONLn0G" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C243D1F00A3C; Wed, 27 May 2026 12:21:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779884512; bh=XkdKOMHryrXQes2OKPHE87/NSPWvD+q/gw3/6HQwABk=; h=From:To:Cc:Subject:Date:Reply-To; b=ecONLn0GoZDJzhIujXjoG7J1rYeAXmF/n0cuLjVgstOHrv2uA6qS9wne3GpSyZwCi c/BBPgoJXZ0q2GIkSrnC/3w53gVhilZUF5EiXO58VBqNUPrXZsnykMiiliCrThODTY me5dm8UxOq4vPzzPTNvw15JFffs+ww6HldwqBI80= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-45855: ata: libata-scsi: avoid Non-NCQ command starvation Date: Wed, 27 May 2026 14:18:17 +0200 Message-ID: <2026052709-CVE-2026-45855-5121@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=5123; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=CyLMwXoC9FOAjMzgFQeS/RsYJH0ZPFH8lD71SzPTWkc=; b=owGbwMvMwCRo6H6F97bub03G02pJDFliDxm//Dyj4rBug17E610bGx782fr2R+4VD4P/4vbPG 4R2yAqyd8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEXk9nWLB3prvQ5WB5p5Xp pz4cOxhZfUO6ci3DgrMHeZrczG991S2cJCy+wiOpO3bNcQA= 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: ata: libata-scsi: avoid Non-NCQ command starvation When a non-NCQ command is issued while NCQ commands are being executed, ata_scsi_qc_issue() indicates to the SCSI layer that the command issuing should be deferred by returning SCSI_MLQUEUE_XXX_BUSY. This command deferring is correct and as mandated by the ACS specifications since NCQ and non-NCQ commands cannot be mixed. However, in the case of a host adapter using multiple submission queues, when the target device is under a constant load of NCQ commands, there are no guarantees that requeueing the non-NCQ command will be executed later and it may be deferred again repeatedly as other submission queues can constantly issue NCQ commands from different CPUs ahead of the non-NCQ command. This can lead to very long delays for the execution of non-NCQ commands, and even complete starvation for these commands in the worst case scenario. Since the block layer and the SCSI layer do not distinguish between queueable (NCQ) and non queueable (non-NCQ) commands, libata-scsi SAT implementation must ensure forward progress for non-NCQ commands in the presence of NCQ command traffic. This is similar to what SAS HBAs with a hardware/firmware based SAT implementation do. Implement such forward progress guarantee by limiting requeueing of non-NCQ commands from ata_scsi_qc_issue(): when a non-NCQ command is received and NCQ commands are in-flight, do not force a requeue of the non-NCQ command by returning SCSI_MLQUEUE_XXX_BUSY and instead return 0 to indicate that the command was accepted but hold on to the qc using the new deferred_qc field of struct ata_port. This deferred qc will be issued using the work item deferred_qc_work running the function ata_scsi_deferred_qc_work() once all in-flight commands complete, which is checked with the port qc_defer() callback return value indicating that no further delay is necessary. This check is done using the helper function ata_scsi_schedule_deferred_qc() which is called from ata_scsi_qc_complete(). This thus excludes this mechanism from all internal non-NCQ commands issued by ATA EH. When a port deferred_qc is non NULL, that is, the port has a command waiting for the device queue to drain, the issuing of all incoming commands (both NCQ and non-NCQ) is deferred using the regular busy mechanism. This simplifies the code and also avoids potential denial of service problems if a user issues too many non-NCQ commands. Finally, whenever ata EH is scheduled, regardless of the reason, a deferred qc is always requeued so that it can be retried once EH completes. This is done by calling the function ata_scsi_requeue_deferred_qc() from ata_eh_set_pending(). This avoids the need for any special processing for the deferred qc in case of NCQ error, link or device reset, or device timeout. The Linux kernel CVE team has assigned CVE-2026-45855 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit bdb01301f3ea51a59eff252b06643fc1fe843e57 and fixed in 6.12.77 with commit ce22aaed011206fed9cbd8c9c2d44718607f31ee Issue introduced in 5.10 with commit bdb01301f3ea51a59eff252b06643fc1fe843e57 and fixed in 6.18.14 with commit 888cd7e40adb2ef4af1b4d3b6e2e83ad409ae8c2 Issue introduced in 5.10 with commit bdb01301f3ea51a59eff252b06643fc1fe843e57 and fixed in 6.19.4 with commit 5d61a38a60e62750526d94663b69b7ac5c7f07a5 Issue introduced in 5.10 with commit bdb01301f3ea51a59eff252b06643fc1fe843e57 and fixed in 7.0 with commit 0ea84089dbf62a92dc7889c79e6b18fc89260808 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-45855 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/ata/libata-core.c drivers/ata/libata-eh.c drivers/ata/libata-scsi.c drivers/ata/libata.h include/linux/libata.h 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/ce22aaed011206fed9cbd8c9c2d44718607f31ee https://git.kernel.org/stable/c/888cd7e40adb2ef4af1b4d3b6e2e83ad409ae8c2 https://git.kernel.org/stable/c/5d61a38a60e62750526d94663b69b7ac5c7f07a5 https://git.kernel.org/stable/c/0ea84089dbf62a92dc7889c79e6b18fc89260808