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 2D2AE16D4CB for ; Wed, 21 Aug 2024 06:13:46 +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=1724220826; cv=none; b=f5YQLBE2+7oNsK1l9PLvdOFnEfjwRr4Lp2GQ/wi6Ekiko1BWVni+pTbZWBVuSEclz9YUIX+V2BfQe03vJQG/j4mpmFg9gkE7idY7D9gsWvTMwTH19wZG7HFe0dcnNsCgDpGcPB5zr+J8MUoGsvLB0mdNrnZ6Lq8fHo8EcVlhwB8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724220826; c=relaxed/simple; bh=8W7pQsESnbLc+GkYnK7AON4vNqvChYFmf3MwFnVmjo0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nbCeeGAhwGlaFDw+/Eb8cBJq0oBklmxklB5ZD/NDlVCKiID9VYGjbfcONJ+akRxcmR/W8bF8fACgLqnK9kqz5adD9rR2MFUW9UmlLCQbtAgwCDeZKqVAlp5GIKZZiSdeiuXEDwwfA5eeCcyBHQdqHAEtw+sKGE7DAsfOPe0OfCQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=brXkK+ev; 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="brXkK+ev" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0BFEC32786; Wed, 21 Aug 2024 06:13:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1724220826; bh=8W7pQsESnbLc+GkYnK7AON4vNqvChYFmf3MwFnVmjo0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=brXkK+evYRCb5FqoYorBGrTb2FlKad7cdPS+gwyDwyMjnI3Qojpn/ANdTS3JJqDyc 4qVkexsxnWHHG+KFS6F1jnWq+zTGD8f2/6JgMOWwa1rm/F7eMjTjw2ehG5IIulh36M YHI1jdSHL1gMULHwAFKSQ08C8+Pit5Dl4voTYoBk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48894: iommu/arm-smmu-v3: Don't unregister on shutdown Date: Wed, 21 Aug 2024 14:11:28 +0800 Message-ID: <2024082110-CVE-2022-48894-7997@gregkh> X-Mailer: git-send-email 2.46.0 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=2227; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=8W7pQsESnbLc+GkYnK7AON4vNqvChYFmf3MwFnVmjo0=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlHW/79d0iomL3/Soq4qHnJr5vH202P5tyyFXPo2nX+n 9fRgidTO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAit2QY5srO3KbEYCR7XaJB es98h2iuxzkJ0xnmKd7nZvh0VnrxgckbN9bdUvvDxGSuDQA= 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: iommu/arm-smmu-v3: Don't unregister on shutdown Similar to SMMUv2, this driver calls iommu_device_unregister() from the shutdown path, which removes the IOMMU groups with no coordination whatsoever with their users - shutdown methods are optional in device drivers. This can lead to NULL pointer dereferences in those drivers' DMA API calls, or worse. Instead of calling the full arm_smmu_device_remove() from arm_smmu_device_shutdown(), let's pick only the relevant function call - arm_smmu_device_disable() - more or less the reverse of arm_smmu_device_reset() - and call just that from the shutdown path. The Linux kernel CVE team has assigned CVE-2022-48894 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1 with commit 57365a04c921 and fixed in 6.1.7 with commit ead3e6c79479 Issue introduced in 6.1 with commit 57365a04c921 and fixed in 6.2 with commit 32ea2c57dc21 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-2022-48894 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/iommu/arm/arm-smmu-v3/arm-smmu-v3.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/ead3e6c79479890444c777fd329afc125fecde48 https://git.kernel.org/stable/c/32ea2c57dc216b6ad8125fa680d31daa5d421c95