CVE-2022-49570: gpio: gpio-xilinx: Fix integer overflow
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
gpio: gpio-xilinx: Fix integer overflow
Current implementation is not able to configure more than 32 pins due to incorrect data type. So type casting with unsigned long to avoid it.
The Linux kernel CVE team has assigned CVE-2022-49570 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.14 with commit 02b3f84d9080b0f4297f31258307f626a43faba5 and fixed in 5.15.58 with commit e129e5486b981d324057e6986059f852658b0d00 Issue introduced in 5.14 with commit 02b3f84d9080b0f4297f31258307f626a43faba5 and fixed in 5.18.15 with commit 6f16a5390640807dde420ee5ccbc4c95577aea6a Issue introduced in 5.14 with commit 02b3f84d9080b0f4297f31258307f626a43faba5 and fixed in 5.19 with commit 32c094a09d5829ad9b02cdf667569aefa8de0ea6
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-49570
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/gpio/gpio-xilinx.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/e129e5486b981d324057e6986059f852658b0d00 https://git.kernel.org/stable/c/6f16a5390640807dde420ee5ccbc4c95577aea6a https://git.kernel.org/stable/c/32c094a09d5829ad9b02cdf667569aefa8de0ea6