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 BFBC6217F26 for ; Wed, 26 Feb 2025 02:14:41 +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=1740536081; cv=none; b=EHjKfxEa2brS6PWbNvXA0qpvNF+XfVkG6omIxVcXhxTZPntXbCiD5cMB3KL78bgcYm7vhSAmJmHgGKJaWbu0/t27O4XTzSH9uvsrZlYRPpSq5mfrE0w0oGQ+XRGHSgLhi8DBvGAClbhJdxPbJjw0urrfbh7AbdwDex+C/nmoGXk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536081; c=relaxed/simple; bh=ltUPrhFZth/845Yfs2N5iYfECNVm8zjH/Wk2xqlCdr4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cuUh3KvummAVksXp78FamS4VMO31yP5mcNR6eTQvcsx2/kzFo0vTawdojwvU9ZxEmuFuVzkGvkuz37gz+mPwpPxD7V5Lgdw56Ugc/4VFimgCZTpFg/jlbU7BaDCtp145rRE5amVCq3tyIebY/6GBFrJTD+EbqVBaQGjZ1wZHAFQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=v2pEsTKH; 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="v2pEsTKH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95C03C4CEDD; Wed, 26 Feb 2025 02:14:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536081; bh=ltUPrhFZth/845Yfs2N5iYfECNVm8zjH/Wk2xqlCdr4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=v2pEsTKHdWsj0aRZrTICtGpoIGoV8244BqZGvM/w59qD9vREFW6rMm2jNQIT711+2 ZLBfj0jug84+frCxcK38kdTUXznzDFRHpQ05MYl25KW6FGI+quG1LIXcOZq5ZtntVI eQMUJI/0RitGdjN2B1w2hLq3T3MYVI+MH5H3EaMQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49427: iommu/mediatek: Remove clk_disable in mtk_iommu_remove Date: Wed, 26 Feb 2025 03:11:41 +0100 Message-ID: <2025022655-CVE-2022-49427-f29d@gregkh> X-Mailer: git-send-email 2.48.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=3535; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ltUPrhFZth/845Yfs2N5iYfECNVm8zjH/Wk2xqlCdr4=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7yj/rBduH8NzbP2l3XkpmmOSkeu4br1l5b8+b9zO8b /6JcMmqjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjI9DkM80tOdqWdO7dfaPrv T1azzOYtqYsJE2dY0Bh+ZsXa6PIY3o1rhdmSm2a+9I2OAgA= 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/mediatek: Remove clk_disable in mtk_iommu_remove After the commit b34ea31fe013 ("iommu/mediatek: Always enable the clk on resume"), the iommu clock is controlled by the runtime callback. thus remove the clk control in the mtk_iommu_remove. Otherwise, it will warning like: echo 14018000.iommu > /sys/bus/platform/drivers/mtk-iommu/unbind [ 51.413044] ------------[ cut here ]------------ [ 51.413648] vpp0_smi_iommu already disabled [ 51.414233] WARNING: CPU: 2 PID: 157 at */v5.15-rc1/kernel/mediatek/ drivers/clk/clk.c:952 clk_core_disable+0xb0/0xb8 [ 51.417174] Hardware name: MT8195V/C(ENG) (DT) [ 51.418635] pc : clk_core_disable+0xb0/0xb8 [ 51.419177] lr : clk_core_disable+0xb0/0xb8 ... [ 51.429375] Call trace: [ 51.429694] clk_core_disable+0xb0/0xb8 [ 51.430193] clk_core_disable_lock+0x24/0x40 [ 51.430745] clk_disable+0x20/0x30 [ 51.431189] mtk_iommu_remove+0x58/0x118 [ 51.431705] platform_remove+0x28/0x60 [ 51.432197] device_release_driver_internal+0x110/0x1f0 [ 51.432873] device_driver_detach+0x18/0x28 [ 51.433418] unbind_store+0xd4/0x108 [ 51.433886] drv_attr_store+0x24/0x38 [ 51.434363] sysfs_kf_write+0x40/0x58 [ 51.434843] kernfs_fop_write_iter+0x164/0x1e0 The Linux kernel CVE team has assigned CVE-2022-49427 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit b34ea31fe013569d42b7e8681ef3f717f77c5b72 and fixed in 5.15.46 with commit 053465ab20dcd324a43a1811ee98e5721e6a3e65 Issue introduced in 5.13 with commit b34ea31fe013569d42b7e8681ef3f717f77c5b72 and fixed in 5.17.14 with commit 9b3bd97acb4f8954b8a43a5d63ed9050d463b4e1 Issue introduced in 5.13 with commit b34ea31fe013569d42b7e8681ef3f717f77c5b72 and fixed in 5.18.3 with commit 6eaa046c696c83542c56765cdde564d9818ff1fb Issue introduced in 5.13 with commit b34ea31fe013569d42b7e8681ef3f717f77c5b72 and fixed in 5.19 with commit 98df772bdd1c4ce717a26289efea15cbbe4b64ed Issue introduced in 5.12.4 with commit 5cad9e2caa9613fdcd246bd4ebf0ffbec1cba2ca 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-49427 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/mtk_iommu.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/053465ab20dcd324a43a1811ee98e5721e6a3e65 https://git.kernel.org/stable/c/9b3bd97acb4f8954b8a43a5d63ed9050d463b4e1 https://git.kernel.org/stable/c/6eaa046c696c83542c56765cdde564d9818ff1fb https://git.kernel.org/stable/c/98df772bdd1c4ce717a26289efea15cbbe4b64ed