Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2F4B934EEE1 for ; Fri, 24 Apr 2026 14:38:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777041485; cv=none; b=WSQpkuFTQEVloMc7oiTQtGLdLxHLeW+wegtaSQbblqMhjOb7Qm9RI7u8KQI0xfpPK5chNAaiLpMawtRRAc/royzQuAn/r+KOhelb7EVvGlF7gb5FRU5VxXP4EMspXT2PmCm+DLgbfhN7Ar8aEuj4FIrBNINC7ePxJebL8WisHA4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777041485; c=relaxed/simple; bh=xSPvNbiKZZv84HfHxwZbwyn8FYk/7aOluk0FrEbTGbY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Vm3yn5Tf0XUMxSdyoVEzW7CIZqz38ZcKza46A2JY0p+m9Ye15Dbq9s3PW301GyPJhqyKy9F6tdYP0npzPYVPimJAt979ht/hTrkZcn1H/IgekpfywH82QxXzsOpmQiIODqWKhbtkyVyNFT4VjaetDH2I3/Dt9JFBdpWv3ppN4tw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=PyOryjrc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="PyOryjrc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7AE0FC19425; Fri, 24 Apr 2026 14:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777041484; bh=xSPvNbiKZZv84HfHxwZbwyn8FYk/7aOluk0FrEbTGbY=; h=From:To:Cc:Subject:Date:Reply-To:From; b=PyOryjrcHbIs9iF07+0S+aCZwSBu2iHpdwJSBtCnJGHar8iTCg3iSyHk4EhZFaRX0 m81aYKG6O11l8yJ6zfvlaFFDZQQ7dX2nDh+xoa+uT4MKgWJrPCWzf2dJrO8JTHRMgC J+mT6FNpz1BIjo+KTvIKQPV0wqtXFplcmzSS5ec8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31557: nvmet: move async event work off nvmet-wq Date: Fri, 24 Apr 2026 16:36:01 +0200 Message-ID: <2026042457-CVE-2026-31557-dca7@gregkh> X-Mailer: git-send-email 2.53.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=4403; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=fQoUquNXObbrpxWvJz3jQTJHx+VLaqPGPM8vkd+QPjc=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmv68825Oiq9DF6q/w5XizK2W35uOiJ4bILXwNSvl333 sIoVd7SEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABM5sIJhnlrbrcnl90Tv32O+ resX6rfhzOWHJxgWXDiQbPxwQtdPe06z3Xfmn+uSf5p9AQA= 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: nvmet: move async event work off nvmet-wq For target nvmet_ctrl_free() flushes ctrl->async_event_work. If nvmet_ctrl_free() runs on nvmet-wq, the flush re-enters workqueue completion for the same worker:- A. Async event work queued on nvmet-wq (prior to disconnect): nvmet_execute_async_event() queue_work(nvmet_wq, &ctrl->async_event_work) nvmet_add_async_event() queue_work(nvmet_wq, &ctrl->async_event_work) B. Full pre-work chain (RDMA CM path): nvmet_rdma_cm_handler() nvmet_rdma_queue_disconnect() __nvmet_rdma_queue_disconnect() queue_work(nvmet_wq, &queue->release_work) process_one_work() lock((wq_completion)nvmet-wq) <--------- 1st nvmet_rdma_release_queue_work() C. Recursive path (same worker): nvmet_rdma_release_queue_work() nvmet_rdma_free_queue() nvmet_sq_destroy() nvmet_ctrl_put() nvmet_ctrl_free() flush_work(&ctrl->async_event_work) __flush_work() touch_wq_lockdep_map() lock((wq_completion)nvmet-wq) <--------- 2nd Lockdep splat: ============================================ WARNING: possible recursive locking detected 6.19.0-rc3nvme+ #14 Tainted: G N -------------------------------------------- kworker/u192:42/44933 is trying to acquire lock: ffff888118a00948 ((wq_completion)nvmet-wq){+.+.}-{0:0}, at: touch_wq_lockdep_map+0x26/0x90 but task is already holding lock: ffff888118a00948 ((wq_completion)nvmet-wq){+.+.}-{0:0}, at: process_one_work+0x53e/0x660 3 locks held by kworker/u192:42/44933: #0: ffff888118a00948 ((wq_completion)nvmet-wq){+.+.}-{0:0}, at: process_one_work+0x53e/0x660 #1: ffffc9000e6cbe28 ((work_completion)(&queue->release_work)){+.+.}-{0:0}, at: process_one_work+0x1c5/0x660 #2: ffffffff82d4db60 (rcu_read_lock){....}-{1:3}, at: __flush_work+0x62/0x530 Workqueue: nvmet-wq nvmet_rdma_release_queue_work [nvmet_rdma] Call Trace: __flush_work+0x268/0x530 nvmet_ctrl_free+0x140/0x310 [nvmet] nvmet_cq_put+0x74/0x90 [nvmet] nvmet_rdma_free_queue+0x23/0xe0 [nvmet_rdma] nvmet_rdma_release_queue_work+0x19/0x50 [nvmet_rdma] process_one_work+0x206/0x660 worker_thread+0x184/0x320 kthread+0x10c/0x240 ret_from_fork+0x319/0x390 Move async event work to a dedicated nvmet-aen-wq to avoid reentrant flush on nvmet-wq. The Linux kernel CVE team has assigned CVE-2026-31557 to this issue. Affected and fixed versions =========================== Fixed in 6.12.80 with commit 49c7c50ee6325a084216e94395e067ecde8088fa Fixed in 6.18.21 with commit ca111c9d8d6c9d5735878d933a1716c4be86c2d1 Fixed in 6.19.11 with commit 25ceffc1dabec3b93f458b437aae26f4da293f87 Fixed in 7.0 with commit 2922e3507f6d5caa7f1d07f145e186fc6f317a4e 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-31557 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/nvme/target/admin-cmd.c drivers/nvme/target/core.c drivers/nvme/target/nvmet.h drivers/nvme/target/rdma.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/49c7c50ee6325a084216e94395e067ecde8088fa https://git.kernel.org/stable/c/ca111c9d8d6c9d5735878d933a1716c4be86c2d1 https://git.kernel.org/stable/c/25ceffc1dabec3b93f458b437aae26f4da293f87 https://git.kernel.org/stable/c/2922e3507f6d5caa7f1d07f145e186fc6f317a4e