VYPR
Unrated severityNVD Advisory· Published Dec 24, 2025· Updated Apr 15, 2026

CVE-2022-50698

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

2

Patches

5

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.