CVE-2023-53255: firmware: stratix10-svc: Fix a potential resource leak in svc_create_memory_pool()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
firmware: stratix10-svc: Fix a potential resource leak in svc_create_memory_pool()
svc_create_memory_pool() is only called from stratix10_svc_drv_probe(). Most of resources in the probe are managed, but not this memremap() call.
There is also no memunmap() call in the file.
So switch to devm_memremap() to avoid a resource leak.
The Linux kernel CVE team has assigned CVE-2023-53255 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.0 with commit 7ca5ce896524f5292e610b27d168269e5ab74951 and fixed in 5.4.251 with commit e3373e6b6c79aff698442b00d20c9f285d296e46 Issue introduced in 5.0 with commit 7ca5ce896524f5292e610b27d168269e5ab74951 and fixed in 5.10.188 with commit c04ed61ebf01968d7699b121663982493ed577fb Issue introduced in 5.0 with commit 7ca5ce896524f5292e610b27d168269e5ab74951 and fixed in 5.15.121 with commit 974ac045a05ad12a0b4578fb303f00dcc22f3aba Issue introduced in 5.0 with commit 7ca5ce896524f5292e610b27d168269e5ab74951 and fixed in 6.1.40 with commit cb8a31a56df8492fb0d900959238e1a3ff8b8981 Issue introduced in 5.0 with commit 7ca5ce896524f5292e610b27d168269e5ab74951 and fixed in 6.4.5 with commit 7363de081c793e47866cb54ce7cb8a480cffc259 Issue introduced in 5.0 with commit 7ca5ce896524f5292e610b27d168269e5ab74951 and fixed in 6.5 with commit 1995f15590ca222f91193ed11461862b450abfd6
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-53255
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/firmware/stratix10-svc.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/e3373e6b6c79aff698442b00d20c9f285d296e46 https://git.kernel.org/stable/c/c04ed61ebf01968d7699b121663982493ed577fb https://git.kernel.org/stable/c/974ac045a05ad12a0b4578fb303f00dcc22f3aba https://git.kernel.org/stable/c/cb8a31a56df8492fb0d900959238e1a3ff8b8981 https://git.kernel.org/stable/c/7363de081c793e47866cb54ce7cb8a480cffc259 https://git.kernel.org/stable/c/1995f15590ca222f91193ed11461862b450abfd6