CVE-2023-54228: regulator: raa215300: Fix resource leak in case of error
In the Linux kernel, the following vulnerability has been resolved:
regulator: raa215300: Fix resource leak in case of error
The clkregisterclkdev() allocates memory by calling vclkdevalloc() and this memory is not freed in the error path. Similarly, resources allocated by clkregisterfixedrate() are not freed in the error path.
Fix these issues by using devmclkhwregisterfixedrate() and devmclkhwregisterclkdev().
After this, the static variable clk is not needed. Replace it with local variable hw in probe() and drop calling clkunregisterfixedrate() from raa215300rtcunregisterdevice().
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.5.6-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.5.4 - Compensating control
In the raa215300 driver, replace clk_register_fixed_rate() with devm_clk_hw_register_fixed_rate() and clk_register_clkdev() with devm_clk_hw_register_clkdev(); use a local hw variable in probe() and remove calls to clk_unregister_fixed_rate() from raa215300_rtc_unregister_device(). The static clk variable is no longer needed.
Event History
Frequently Asked Questions
What is the severity of CVE-2023-54228?
CVE-2023-54228 is classified as a low severity vulnerability in the Linux kernel.
How do I fix CVE-2023-54228?
To fix CVE-2023-54228, ensure that your Linux kernel is updated to the latest version where the vulnerability has been patched.
What type of vulnerability is CVE-2023-54228?
CVE-2023-54228 is a resource leak vulnerability that occurs during error handling in the Linux kernel.
Which software is affected by CVE-2023-54228?
CVE-2023-54228 affects the Linux kernel, specifically related to the regulator subsystem.
What could be the impact of CVE-2023-54228?
The impact of CVE-2023-54228 could lead to resource exhaustion in systems using the affected Linux kernel versions.