[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025091715-CVE-2022-50364-b594@gregkh>
Date: Wed, 17 Sep 2025 16:56:23 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2022-50364: i2c: mux: reg: check return value after calling platform_get_resource()
From: Greg Kroah-Hartman <gregkh@...nel.org>
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
Powered by blists - more mailing lists