Linux Kernel DA7219 ASoC Error Handling Vulnerability
Vulnerability
An error handling vulnerability has been identified in the Linux kernel's ASoC DA7219 codec driver. The issue arises in the 'da7219_register_dai_clks' function, where the 'clk_hw_register' function's failure is not properly managed. Specifically, if 'clk_hw_register' fails, the corresponding clock should not be unregistered. To address this, the error handling has been revised to include a clock unregistration step and to use a 'while' loop for cleaning up partial iterations before exiting the function. This vulnerability affects the Linux kernel stable tree.
Impact
The vulnerability could lead to improper management of clock resources, potentially causing issues in audio playback or recording functionality that relies on the DA7219 codec.
Reproduction
The vulnerability can be reproduced by loading a device driver that uses the ASoC framework with a DA7219 codec. If the driver attempts to register digital audio interface (DAI) clocks and the clock registration fails, the error handling will not correctly unregister the associated resources. This can be observed by monitoring the system's audio performance or by checking for leaked clock resources after the driver is unloaded.
Remediation
The vulnerability has been addressed in the Linux kernel. Users can upgrade to the latest version of the stable kernel to apply the fix.
Vulnerability Rating
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.
