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 962173D6F for ; Thu, 1 May 2025 12:58:11 +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=1746104291; cv=none; b=DasB60ooJm/LFfmMzQ6gwMO4eMX3Mcb93GPPnQNrhFDgprnV1TC6TvDLBcFzbZMNJlXA3LnQgPGi31biObEe92tGdYx99SkPRSFKsh2gy0etkwgzjMoJaKKmbE18RNDyTLilbs7rsIVccnImbZO1gwu1Tqrzf0ag5LTp5QyOwzI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746104291; c=relaxed/simple; bh=DZFAuHVJ9ln2a7G9Hx1ym7FFt0l5KzS2QQgHXtA9zx4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hxyi1+ZV5nEWRtS/yNhrKD1qXDSunZ0YTram8dGrAdFsBYMkfzvSp0sFPb3Roz1fALyytkCrLYhCyXv8KJ+CpZO+5k1RAvB2jwN9ZwiobrSO+2+0s20x69ryaBLwZxmMLVs7tnvXhOoEexQliCQIs81GoUaOKxze4v+mCo3KUgY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Gt20v9oc; 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="Gt20v9oc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05C24C4CEE3; Thu, 1 May 2025 12:58:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746104291; bh=DZFAuHVJ9ln2a7G9Hx1ym7FFt0l5KzS2QQgHXtA9zx4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Gt20v9ocBWSkDvPgewdoW0CT5FCK1rqxroU7sMT1SUpp70cMY0fKpnXppGtV7/gEI 0ELMEIPWFZa2f3MtBHI8uZrg9oVqpnS/T7OgwheR1/HaBIavC/4KzfPxlWvQ/JouVg sD5AKj+Q5zi3IXvfjsB4P0eW1+ECg0bkjjlkrS3I= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37748: iommu/mediatek: Fix NULL pointer deference in mtk_iommu_device_group Date: Thu, 1 May 2025 14:56:54 +0200 Message-ID: <2025050136-CVE-2025-37748-56c8@gregkh> X-Mailer: git-send-email 2.49.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=3081; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=tGRKgX+5wBdbsmReYKLyijaFvzmg2swTrPd/Z0nvwwE=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnC+S2u3+pYfOtTLn8M/JSw3SadPbolkN9LvHpC+7kdO Wu+n1PriGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgInwn2SY78NSXSK8nmPPnFtb 1SSMHkrb+699wDBXmCHQx5Zp8sT3HZMb3PZcq35a8P0DAA== 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: iommu/mediatek: Fix NULL pointer deference in mtk_iommu_device_group Currently, mtk_iommu calls during probe iommu_device_register before the hw_list from driver data is initialized. Since iommu probing issue fix, it leads to NULL pointer dereference in mtk_iommu_device_group when hw_list is accessed with list_first_entry (not null safe). So, change the call order to ensure iommu_device_register is called after the driver data are initialized. The Linux kernel CVE team has assigned CVE-2025-37748 to this issue. Affected and fixed versions =========================== Issue introduced in 5.19 with commit 9e3a2a64365318a743e3c0b028952d2cdbaf2b0c and fixed in 6.1.135 with commit 2f75cb27bef43c8692b0f5e471e5632f6a9beb99 Issue introduced in 5.19 with commit 9e3a2a64365318a743e3c0b028952d2cdbaf2b0c and fixed in 6.6.88 with commit 6abd09bed43b8d83d461e0fb5b9a200a06aa8a27 Issue introduced in 5.19 with commit 9e3a2a64365318a743e3c0b028952d2cdbaf2b0c and fixed in 6.12.24 with commit a0842539e8ef9386c070156103aff888e558a60c Issue introduced in 5.19 with commit 9e3a2a64365318a743e3c0b028952d2cdbaf2b0c and fixed in 6.13.12 with commit ce7d3b2f6f393fa35f0ea12861b83a1ca28b295c Issue introduced in 5.19 with commit 9e3a2a64365318a743e3c0b028952d2cdbaf2b0c and fixed in 6.14.3 with commit 69f9d2d37d1207c5a73dac52a4ce1361ead707f5 Issue introduced in 5.19 with commit 9e3a2a64365318a743e3c0b028952d2cdbaf2b0c and fixed in 6.15-rc2 with commit 38e8844005e6068f336a3ad45451a562a0040ca1 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-37748 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/2f75cb27bef43c8692b0f5e471e5632f6a9beb99 https://git.kernel.org/stable/c/6abd09bed43b8d83d461e0fb5b9a200a06aa8a27 https://git.kernel.org/stable/c/a0842539e8ef9386c070156103aff888e558a60c https://git.kernel.org/stable/c/ce7d3b2f6f393fa35f0ea12861b83a1ca28b295c https://git.kernel.org/stable/c/69f9d2d37d1207c5a73dac52a4ce1361ead707f5 https://git.kernel.org/stable/c/38e8844005e6068f336a3ad45451a562a0040ca1