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 4445714264C for ; Tue, 21 May 2024 14:39:18 +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=1716302358; cv=none; b=CALzb4nTcyrS/BoH9fwhFde+nxRuSCwpHCylVyd1p021Hn/Eny1TUPXsrjCNyzyOulqvtDYjUkrM67HUS2yvXhLf7QWCEuxI1N3PpfiyJC8YHHs7S/5xjndHq0VGG+a4pJWtvhcQ+BvRFyAfcaEez68qYCqlk9jUiGIx8Z3YdoQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716302358; c=relaxed/simple; bh=BuDsrMMQM1s8WXCtjiBK1saEL4ZqgNcN+FCNJF/DfuM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=p/1kfQsjdeMjkCEo3pvwmsr1V273TwxEhOCiYgtYH3N2kdBcfb7FqZSwmFr8cinSHB0ak4vdRXuvtHDty2VzbierbR8ByGP9Ex55iO50ve91uFQ/IfNLDO1zfaSwub/w/tjxN++U0nAeNBBHCicDExHNTFdiots13Ugbz1Alxsk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wrzTuQdl; 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="wrzTuQdl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1C4CC2BD11; Tue, 21 May 2024 14:39:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716302358; bh=BuDsrMMQM1s8WXCtjiBK1saEL4ZqgNcN+FCNJF/DfuM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=wrzTuQdldGuwnvB7LTjcj4XWjNTKgtBkWfS+6+3nAd6t5qwjPTQBmLApvYyREEtzv 4rZFM6XOuV/xp4f8AeNhh+1odYqNKctdn6jsMcHjQNsBJcyvNgJDQGBI8elPqK08Fw p1Ew3EV4X9qJXBP0W5cpSj3GrGoATc1/6q+a3bJY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47328: scsi: iscsi: Fix conn use after free during resets Date: Tue, 21 May 2024 16:36:02 +0200 Message-ID: <2024052134-CVE-2021-47328-441f@gregkh> X-Mailer: git-send-email 2.45.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2560; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=BuDsrMMQM1s8WXCtjiBK1saEL4ZqgNcN+FCNJF/DfuM=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+G828PvJvUdjGvl399tJ78ed2/Fug2pdYXbKiLVX6W OLDrTozOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAimRYM87SlP755/+lMm/Oi tEMOBbuvmLCvk2CYZ9nedmTDXP32sm0PhPUftZZfPP9tLwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: scsi: iscsi: Fix conn use after free during resets If we haven't done a unbind target call we can race where iscsi_conn_teardown wakes up the EH thread and then frees the conn while those threads are still accessing the conn ehwait. We can only do one TMF per session so this just moves the TMF fields from the conn to the session. We can then rely on the iscsi_session_teardown->iscsi_remove_session->__iscsi_unbind_session call to remove the target and it's devices, and know after that point there is no device or scsi-ml callout trying to access the session. The Linux kernel CVE team has assigned CVE-2021-47328 to this issue. Affected and fixed versions =========================== Fixed in 4.19.198 with commit bf20d85a8838 Fixed in 5.4.134 with commit d04958a348e5 Fixed in 5.10.52 with commit 89812e7957ab Fixed in 5.12.19 with commit f0a031f7c55f Fixed in 5.13.4 with commit fa9542b35ceb Fixed in 5.14 with commit ec29d0ac29be 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-2021-47328 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/scsi/libiscsi.c include/scsi/libiscsi.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/bf20d85a88384574fabb3d53ad62a8af57e7ab11 https://git.kernel.org/stable/c/d04958a348e560938410e04a12fb99da9c7e6a00 https://git.kernel.org/stable/c/89812e7957ab0746eab66ed6fc49d52bb4dca250 https://git.kernel.org/stable/c/f0a031f7c55ffd944fead1ddaf2aa94df9a158c1 https://git.kernel.org/stable/c/fa9542b35ceb4202e8f8d65f440529a63524dca9 https://git.kernel.org/stable/c/ec29d0ac29be366450a7faffbcf8cba3a6a3b506