CVE-2023-54101: driver: soc: xilinx: use _safe loop iterator to avoid a use after free
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
driver: soc: xilinx: use _safe loop iterator to avoid a use after free
The hash_for_each_possible() loop dereferences "eve_data" to get the next item on the list. However the loop frees eve_data so it leads to a use after free. Use hash_for_each_possible_safe() instead.
The Linux kernel CVE team has assigned CVE-2023-54101 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.17 with commit c7fdb2404f66131bc9c22e06f712717288826487 and fixed in 6.1.39 with commit 49fca83f6f3f0cafe5bf5b43e8ee81cf73c2d5e0 Issue introduced in 5.17 with commit c7fdb2404f66131bc9c22e06f712717288826487 and fixed in 6.3.13 with commit f16599e638073ef0b2828bb64f5e99138e9381b5 Issue introduced in 5.17 with commit c7fdb2404f66131bc9c22e06f712717288826487 and fixed in 6.4.4 with commit 256aace3a5d8c987183ba4832dffb36f48ea7d3b Issue introduced in 5.17 with commit c7fdb2404f66131bc9c22e06f712717288826487 and fixed in 6.5 with commit c58da0ba3e5c86e51e2c1557afaf6f71e00c4533
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-54101
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/soc/xilinx/xlnx_event_manager.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/49fca83f6f3f0cafe5bf5b43e8ee81cf73c2d5e0 https://git.kernel.org/stable/c/f16599e638073ef0b2828bb64f5e99138e9381b5 https://git.kernel.org/stable/c/256aace3a5d8c987183ba4832dffb36f48ea7d3b https://git.kernel.org/stable/c/c58da0ba3e5c86e51e2c1557afaf6f71e00c4533