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 0E3FD2E2DFB for ; Tue, 7 Oct 2025 15:21:35 +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=1759850496; cv=none; b=CkUiXJMmSaL0lU41PkHG1DQczjW/1AFpbQ+34QuMIyw9GTqDhBdKF+uil22YW6ZwvqTq6uSkidq5vakp2vHt68PblRaowVhbRSkfm/xxPlxtq1AJDrXYk9MoANp/Qm3OyzX3+FpOF1Vw2m/8/yg6epTMde3IQCoTqX08/EsF06g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759850496; c=relaxed/simple; bh=T4KWxowknevHt6FGEd29eYiI/8ewgf7GXcXcv8snbgM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MlgwsvuMm00ePjrSrhRPHlk/ICNrMdUxsTgqUHfnkedydhCJ+0xzmOFjUQ/rcfAmniHYhoaRKLpI6Ys/Jx8r8QAr6H+4pHKtgAQQ2R2G/mja2W9D+4bvu6xz1oFPFKtwtpQAtUPKdpYSH3fj1s0OkYb7/F9Gd+APtC34Tz2wa2k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DmMdz3Do; 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="DmMdz3Do" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D170C4CEF1; Tue, 7 Oct 2025 15:21:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759850495; bh=T4KWxowknevHt6FGEd29eYiI/8ewgf7GXcXcv8snbgM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=DmMdz3DoHZbPdbKJ0Dx1bs1xcIdwalRI3pNnMcyFziOlqhnjibAy6tYFobzBNE6HH VYHu4kC1FDAavpOa+LmtHWX5Bdvvo7pzUrtMGwSwVpLBd2A23ZtH0lqHm/guyRnWWV IL2+rzjgud68URW+uxFAYLuxrxS7cTavw6XQwHvU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50524: iommu/mediatek: Check return value after calling platform_get_resource() Date: Tue, 7 Oct 2025 17:19:11 +0200 Message-ID: <2025100705-CVE-2022-50524-f437@gregkh> X-Mailer: git-send-email 2.51.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=2131; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=sbJt37pxWzXgDeGC/osJkd2MJoqogGGQdf9sDQsGZ/I=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlP9TN/G+35G7VSL1T94WUD7nn/7P+4CRZKfOpil6taM DlpUp1sRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzkmSPDgmuf2dYdvxMs8/PZ neqDrRM5steWKDMsWJJiVXFE8cn81tp1Hr/OWx37zL5LFgA= 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: Check return value after calling platform_get_resource() platform_get_resource() may return NULL pointer, we need check its return value to avoid null-ptr-deref in resource_size(). The Linux kernel CVE team has assigned CVE-2022-50524 to this issue. Affected and fixed versions =========================== Issue introduced in 5.19 with commit 42d57fc58aebc5801804424082028f43bad1b73c and fixed in 6.0.16 with commit bfebf05883cdcf9ac983033987fae869bd59ca53 Issue introduced in 5.19 with commit 42d57fc58aebc5801804424082028f43bad1b73c and fixed in 6.1.2 with commit feca904412483b2e0a903dd1f2e2843afd445f8c Issue introduced in 5.19 with commit 42d57fc58aebc5801804424082028f43bad1b73c and fixed in 6.2 with commit 73b6924cdebc899de9b719e1319aa86c6bed4acf 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-50524 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/bfebf05883cdcf9ac983033987fae869bd59ca53 https://git.kernel.org/stable/c/feca904412483b2e0a903dd1f2e2843afd445f8c https://git.kernel.org/stable/c/73b6924cdebc899de9b719e1319aa86c6bed4acf