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 0EBA835E4C8 for ; Wed, 17 Sep 2025 14:56:40 +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=1758121001; cv=none; b=A6jnqg9VPS0RDXmDP5YB29XLjn3fMvKIXvyPZgzJsBDK2mCF52SKTJDyQ71t3inZ4pMyuEcFJoeXp5GjZ5u2Bx6mmsZRTdamu3JCsFbQ1F2UkgHt3qHQUnDAGeE2uRWM+IIZlimL/cpDuHOmbFl4IAO9GeWqzPgPjDATAncodrQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758121001; c=relaxed/simple; bh=QBWFuPWsWMYHI9hW4/8lU8jcqfh932ISQIerOkpKr/Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=aNksQQD6inyeJo1SgSOB5BPipL4rv3KpW8VjPR5bHG8zpWRMDBdkHNNeYuDDcYGyBOyAJdFx9yh1QQkL2RQm9psebXYQt0kqfYW58SyzNUrSa75kCcrk2U0nqAHzhIghbJRLaU7GFV+/EpHifZtRuzIYVvFieDbWOeGTn1BL0jg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=X8IYylSs; 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="X8IYylSs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C53FC4CEFC; Wed, 17 Sep 2025 14:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758121000; bh=QBWFuPWsWMYHI9hW4/8lU8jcqfh932ISQIerOkpKr/Q=; h=From:To:Cc:Subject:Date:Reply-to:From; b=X8IYylSsE2NMu1IITiKQuJaVW7/N/WBm5XvlrL0VEE0ySkfgVYUbTvvlWyROuxgy8 BI9vJ2D/Ik5KynXReUCKlBnxRXf3ChuCZ7OiXQmxduoDfoyjaJljkcLlHNnu84F8dY dxhqzK+yH8qz5MPcdiuLlynR+eQKokP/onkFVwM4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50364: i2c: mux: reg: check return value after calling platform_get_resource() Date: Wed, 17 Sep 2025 16:56:23 +0200 Message-ID: <2025091715-CVE-2022-50364-b594@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=2731; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=3H05g0e3sR/GWCTvbgTdzH6TVbbM26WAZ0H6C8VTY0A=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmnzvAzLD8117fBy1Dcq7Gse9W1fIX/G26/fi947hOHG EdN6cG7HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJrAhXJwCMJEHggwLzsqlTmqPiLgqoPcx YMeZ/vSC+AP3GOYnS546Hu5871LAltN/vmt9OC12+5AlAA== 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: i2c: mux: reg: check return value after calling platform_get_resource() It will cause null-ptr-deref in resource_size(), if platform_get_resource() returns NULL, move calling resource_size() after devm_ioremap_resource() that will check 'res' to avoid null-ptr-deref. And use devm_platform_get_and_ioremap_resource() to simplify code. The Linux kernel CVE team has assigned CVE-2022-50364 to this issue. Affected and fixed versions =========================== Issue introduced in 4.3 with commit b3fdd32799d834e2626fae087906e886037350c6 and fixed in 5.10.163 with commit 61df25c41b8e0d2c988ccf17139f70075a2e1ba4 Issue introduced in 4.3 with commit b3fdd32799d834e2626fae087906e886037350c6 and fixed in 5.15.86 with commit 8212800943997fab61874550278d653cb378c60c Issue introduced in 4.3 with commit b3fdd32799d834e2626fae087906e886037350c6 and fixed in 6.0.16 with commit f5049b3ad9446203b916ee375f30fa217735f63a Issue introduced in 4.3 with commit b3fdd32799d834e2626fae087906e886037350c6 and fixed in 6.1.2 with commit f7a440c89b6d460154efeb058272760e41bdfea8 Issue introduced in 4.3 with commit b3fdd32799d834e2626fae087906e886037350c6 and fixed in 6.2 with commit 2d47b79d2bd39cc6369eccf94a06568d84c906ae 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-50364 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/i2c/muxes/i2c-mux-reg.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/61df25c41b8e0d2c988ccf17139f70075a2e1ba4 https://git.kernel.org/stable/c/8212800943997fab61874550278d653cb378c60c https://git.kernel.org/stable/c/f5049b3ad9446203b916ee375f30fa217735f63a https://git.kernel.org/stable/c/f7a440c89b6d460154efeb058272760e41bdfea8 https://git.kernel.org/stable/c/2d47b79d2bd39cc6369eccf94a06568d84c906ae