CVE-2023-53750: pinctrl: freescale: Fix a memory out of bounds when num_configs is 1
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
pinctrl: freescale: Fix a memory out of bounds when num_configs is 1
The config passed in by pad wakeup is 1, when num_configs is 1, Configuration [1] should not be fetched, which will be detected by KASAN as a memory out of bounds condition. Modify to get configs[1] when num_configs is 2.
The Linux kernel CVE team has assigned CVE-2023-53750 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.2 with commit f60c9eac54af28d7b5651fe49944bfd5098550e6 and fixed in 6.3.13 with commit f85d3cb10f4df5ae3bdb9a9357315c28d781651f Issue introduced in 6.2 with commit f60c9eac54af28d7b5651fe49944bfd5098550e6 and fixed in 6.4.4 with commit 27d9a7585b594bb2f9bb1f65e0003814fcc69c75 Issue introduced in 6.2 with commit f60c9eac54af28d7b5651fe49944bfd5098550e6 and fixed in 6.5 with commit 9063777ca1e2e895c5fdd493ee0c3f18fa710ed4
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-2023-53750
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/pinctrl/freescale/pinctrl-scu.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/f85d3cb10f4df5ae3bdb9a9357315c28d781651f https://git.kernel.org/stable/c/27d9a7585b594bb2f9bb1f65e0003814fcc69c75 https://git.kernel.org/stable/c/9063777ca1e2e895c5fdd493ee0c3f18fa710ed4