UAF Vulnerability in ep93xx: clock
Summary
GSD-2022-1000961: ep93xx: clock: Fix UAF in ep93xx_clk_register_gate(). Affects Kernel versions >= 9645ccc7bd7a16cd73c3be9dee70cd702b03be37, < 0f12166872da46c6b57ba2f1314bbf310b3bf017. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The ep93xx is a family of ARM-based microcontrollers produced by Cirrus Logic. The clock subsystem in the ep93xx kernel module is responsible for managing clock gating for various hardware components. Clock gating is a power-saving technique that involves turning off the clock signal to idle or unused components. However, a use-after-free (UAF) vulnerability has been discovered in the ep93xx_clk_register_gate() function, which is used to register clock gates. This vulnerability could potentially allow an attacker to exploit the UAF condition and execute arbitrary code or cause a denial-of-service (DoS) condition.
Vulnerability Detail
The UAF vulnerability in the ep93xx_clk_register_gate() function occurs due to improper handling of clock gate registration. When a clock gate is registered, the function allocates memory for the gate structure and adds it to a linked list. However, if the registration fails, the function does not properly free the allocated memory, leading to a UAF condition. An attacker could potentially trigger this vulnerability by repeatedly registering and unregistering clock gates, causing the freed memory to be reused for other purposes. This could result in memory corruption, leading to arbitrary code execution or system crashes.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, users can disable the affected functionality by removing or disabling the ep93xx kernel module. However, this may result in the loss of certain hardware features or functionality that rely on the clock subsystem. It is strongly recommended to apply the official fix by updating the kernel as soon as possible.
Conclusion
The UAF vulnerability in the ep93xx clock subsystem poses a potential security risk, allowing an attacker to execute arbitrary code or cause a denial-of-service condition. It is crucial to update the Linux Kernel to version v5.17.4 or later to mitigate this vulnerability. Applying the official fix will ensure that the ep93xx_clk_register_gate() function properly handles clock gate registration and prevents the UAF condition from being exploited. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
A use-after-free vulnerability occurs when a program or system continues to use a memory address after it has been freed. This can lead to memory corruption and potentially allow an attacker to execute arbitrary code or cause a system crash.
The UAF vulnerability in the ep93xx clock subsystem could allow an attacker to exploit the use-after-free condition and execute arbitrary code or cause a denial-of-service (DoS) condition. This could result in unauthorized access, data breaches, or system crashes.
You can use the Vulert Playground at Vulert Scanner to check if your system is affected by this vulnerability. Vulert uses a manifest file like package-lock.json to monitor and alert in real-time for open-source vulnerabilities in software.
Yes, as a temporary workaround, you can disable the affected functionality by removing or disabling the ep93xx kernel module. However, it is strongly recommended to apply the official fix by updating the kernel to prevent any potential loss of functionality.
You can find more information about the fix for this vulnerability in the Linux Kernel repository. The fix is available in commit 0f12166872da46c6b57ba2f1314bbf310b3bf017.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.