CVE-2022-50698
Description
In the Linux kernel, the following vulnerability has been resolved:
ASoC: da7219: Fix an error handling path in da7219_register_dai_clks()
If clk_hw_register() fails, the corresponding clk should not be unregistered.
To handle errors from loops, clean up partial iterations before doing the goto. So add a clk_hw_unregister(). Then use a while (--i >= 0) loop in the unwind section.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A use-after-free bug in the Linux kernel's ASoC da7219 driver when clk_hw_register() fails, leading to a potential crash.
Vulnerability
In the Linux kernel, the ASoC (ALSA System on Chip) driver for the Dialog Semiconductor DA7219 audio codec contains an error handling flaw in the da7219_register_dai_clks() function. When clk_hw_register() fails during the registration of clock hardware, the driver incorrectly attempts to unregister the corresponding clock that was never successfully registered. This can lead to a use-after-free condition because the clock object may not be properly initialized or may have been partially cleaned up.
Exploitation
An attacker would need to trigger a failure in clk_hw_register() within the DA7219 driver, which could occur under specific hardware or system conditions. The vulnerability is in the kernel driver, so exploitation requires local access or the ability to influence the clock registration process. No special privileges are needed beyond the ability to cause the driver to load and fail.
Impact
If successfully triggered, the use-after-free can cause a kernel crash (denial of service) or potentially allow an attacker to execute arbitrary code with kernel privileges. The impact is limited to systems using the DA7219 audio codec with the affected kernel versions.
Mitigation
The fix, introduced in Linux kernel stable updates, adds a proper unwind loop using clk_hw_unregister() only for successfully registered clocks. The patch ensures that partial iterations are cleaned up correctly before jumping to the error path. Users should update to a kernel version containing the commit [1] or [2].
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
5ec692f0b5100cefce8bee0e9abb4e4349afe4993c1511d66f5f1f5ee5048Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- git.kernel.org/stable/c/4993c1511d66326f1037bc5156b024a6a96d23efnvd
- git.kernel.org/stable/c/abb4e4349afe7eecdb0499582f1c777031e3a7c8nvd
- git.kernel.org/stable/c/cefce8bee0e988f9a005fe40705b98a25cfb7f9dnvd
- git.kernel.org/stable/c/ec692f0b51006de1138cd1f82cae625f0d2888d1nvd
- git.kernel.org/stable/c/f5f1f5ee5048cfa7bd07f496b33bd2cfc198a176nvd
News mentions
0No linked articles in our index yet.