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 3F4BB143872 for ; Tue, 21 May 2024 15:07:20 +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=1716304041; cv=none; b=tkFVBkNfwf/eu68aA06golUx5ih1toF+MaEGLT5AfIR51xwv/TkEArA8YP3JuVWIvH2FXFPn5iuo5ABmNSMRqGM0ew0RTKq1awWrq/aJjEReuLmV9y39+VeNVzAnzMg1es5TYDva7cf116tZMTglFKs0hL9v6mY0Zeztojo+irU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716304041; c=relaxed/simple; bh=aVsKWh+1JQ+exgN7tkC1JCzw1E4/l13OiCzSRU0qINo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mWalDx4fFxOMOkufHHKFgsAq1VdgPlEmSHo+sl3tHfsBHkiaRo9tOBnpdZ/8NOsAGaI4/A/80y+52SZofYI6EEoO3Pgp2sPgf2VPtJpDsyf/K9rlZqR+nKyfyzI7VgHBrtgHSKvtTIiK75bkTbvUIMnEkDiN1MivOW5o6LyaG/o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GzHK2ZZa; 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="GzHK2ZZa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77E6EC2BD11; Tue, 21 May 2024 15:07:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716304040; bh=aVsKWh+1JQ+exgN7tkC1JCzw1E4/l13OiCzSRU0qINo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=GzHK2ZZaav769MHfdBthglMEfoA0z6gn2IIzDldwQmK/aAgqEkXpEXgz7PdkYnFaz O/UNAS7jGNCzb90+4gEJpPXGmChEmPocgOc0nJUvbdcvxpYrVkJUxpeCgWnxeYnwbF 8i72A5WBCBR7pcYuGU9pISEGtQK20tViSg4reNk8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47427: scsi: iscsi: Fix iscsi_task use after free Date: Tue, 21 May 2024 17:04:44 +0200 Message-ID: <2024052157-CVE-2021-47427-ffc6@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=2154; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=aVsKWh+1JQ+exgN7tkC1JCzw1E4/l13OiCzSRU0qINo=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+2+++mO7lo1M723xatYXr1cq7y0xmqbgwbY96dD3nt oP7D+a1HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRqboMC1YG3lyyucXHfk/Q Tb31T49luiau38Ow4NR1sYDeRclmW5UmvZdJDHgplrIzFAA= 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 iscsi_task use after free Commit d39df158518c ("scsi: iscsi: Have abort handler get ref to conn") added iscsi_get_conn()/iscsi_put_conn() calls during abort handling but then also changed the handling of the case where we detect an already completed task where we now end up doing a goto to the common put/cleanup code. This results in a iscsi_task use after free, because the common cleanup code will do a put on the iscsi_task. This reverts the goto and moves the iscsi_get_conn() to after we've checked if the iscsi_task is valid. The Linux kernel CVE team has assigned CVE-2021-47427 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit d39df158518c and fixed in 5.14.12 with commit 1642f51ac0d4 Issue introduced in 5.14 with commit d39df158518c and fixed in 5.15 with commit 258aad75c621 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-47427 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 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/1642f51ac0d4f2b55d5748094c49ff8f7191b93c https://git.kernel.org/stable/c/258aad75c62146453d03028a44f2f1590d58e1f6