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 46925288C2B for ; Tue, 9 Dec 2025 04:10:45 +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=1765253445; cv=none; b=UD/HeaijTI5Ayphw90E59BfU1e5rDx6XDmLRbqM3y4TH7tHmpBOasKp8ozttwkGUhGK4AkD2Vi0JlVFzpwwWrlFnaISJI7fMOpwFb0DoxmpkDdIjGgo7zoYcQuQ4YOX4zzOKSFhJTjofdrmkyu6dJkMZLRl2eO9eaNzQ6zVQOM4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765253445; c=relaxed/simple; bh=lSeU7UrzYPMWGI9cw6CvupmMNrutDccvvXPP73Ku/sY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ftW4IztW7bdnt5YpEgvmrrYBvZbuKzayHSpUBb8RHjH4By60u92bQbW4cb53ag4+XgTwtdxh2T/A7NcnCTFgrwz/6D9/KaIq1DbzROBJWLyrj8AcelN8Qg+SLImxAYxzy1Oq+Mt6yyN7CvrERydDOhUCDsdOk7lQwzvCRRsZKOQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=h7b9sty/; 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="h7b9sty/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 525F4C4CEF5; Tue, 9 Dec 2025 04:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765253444; bh=lSeU7UrzYPMWGI9cw6CvupmMNrutDccvvXPP73Ku/sY=; h=From:To:Cc:Subject:Date:Reply-To:From; b=h7b9sty/ffbTd7jDdCwtxajl540/uRYQitzUkRWt4ldO1Z6pSl14aFx9Ni7lRbaY9 rudiMRkWhpMZ/9S9ud3fs28Nl2/DRvZOhWb8Ht2B0sj/zTQGk9pZNpj+W7P45llkuf cTvpyWDKviK1z2uBqpjDi/DMSAF5HICmR5ekKbEA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40343: nvmet-fc: avoid scheduling association deletion twice Date: Tue, 9 Dec 2025 13:10:25 +0900 Message-ID: <2025120912-CVE-2025-40343-dbb0@gregkh> X-Mailer: git-send-email 2.52.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=3006; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=aH1NEWUSqDpw2LenP15+lKX8UYz7J04IJqu2GXDykpE=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnmC1U2HZvb8fHmshmPcmY2Hvimt7z1WaPZqjsPm78uK fTOf3S/uCOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAmsngtw4LFC9cHmAcn/9KI iZCreHVtafw1tj8Mc+U9zxoWrrqlbtmZ+Gjnp0+/g8P03wMA 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-fc: avoid scheduling association deletion twice When forcefully shutting down a port via the configfs interface, nvmet_port_subsys_drop_link() first calls nvmet_port_del_ctrls() and then nvmet_disable_port(). Both functions will eventually schedule all remaining associations for deletion. The current implementation checks whether an association is about to be removed, but only after the work item has already been scheduled. As a result, it is possible for the first scheduled work item to free all resources, and then for the same work item to be scheduled again for deletion. Because the association list is an RCU list, it is not possible to take a lock and remove the list entry directly, so it cannot be looked up again. Instead, a flag (terminating) must be used to determine whether the association is already in the process of being deleted. The Linux kernel CVE team has assigned CVE-2025-40343 to this issue. Affected and fixed versions =========================== Fixed in 5.15.197 with commit 2f4852db87e25d4e226b25cb6f652fef9504360e Fixed in 6.1.159 with commit 85e2ce1920cb511d57aae59f0df6ff85b28bf04d Fixed in 6.6.117 with commit 601ed47b2363c24d948d7bac0c23abc8bd459570 Fixed in 6.12.58 with commit 04d17540ef51e2c291eb863ca87fd332259b2d40 Fixed in 6.17.8 with commit c09ac9a63fc3aaf4670ad7b5e4f5afd764424154 Fixed in 6.18 with commit f2537be4f8421f6495edfa0bc284d722f253841d 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-2025-40343 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/fc.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/2f4852db87e25d4e226b25cb6f652fef9504360e https://git.kernel.org/stable/c/85e2ce1920cb511d57aae59f0df6ff85b28bf04d https://git.kernel.org/stable/c/601ed47b2363c24d948d7bac0c23abc8bd459570 https://git.kernel.org/stable/c/04d17540ef51e2c291eb863ca87fd332259b2d40 https://git.kernel.org/stable/c/c09ac9a63fc3aaf4670ad7b5e4f5afd764424154 https://git.kernel.org/stable/c/f2537be4f8421f6495edfa0bc284d722f253841d