rtc: amlogic-a4: fix double free caused by devm
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.17.136.18.26.19In the Linux kernel, the following vulnerability has been resolved:
rtc: amlogic-a4: fix double free caused by devm
The clock obtained via devm_clk_get_enabled() is automatically managed by devres and will be disabled and freed on driver detach. Manually calling clk_disable_unprepare() in error path and remove function causes double free.
Remove the redundant clk_disable_unprepare() calls from the probe error path and aml_rtc_remove(), allowing the devm framework to automatically manage the clock lifecycle.
From the CVE record · Linux
The Linux kernel’s amlogic-a4 RTC driver can double-free a managed clock during a probe error or driver removal. The input does not describe an attacker path, authentication requirements, or user interaction.
Engineers running Linux kernels with the amlogic-a4 RTC driver should check whether their kernel is affected; affected versions are not specified.