AZL-117169: CVE-2026-139476 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
ALSA: hda: Don't free card at probe error in vgaswitcheroo handler
The vgaswitcheroo handler azxvssetstate() calls azxprobecontine() for enabling the audio, and if an error happens during the probe, azxprobecontinue() releases its associated sound card object at the error path. The card release procedure includes the call of vgaswitcheroounregisterclient(), and this triggers the vgasrmutex lock again that had been already held by the caller (vgaswitcherooprocessdelayedswitch()) -- leading to a deadlock.
(Moreover, the card release will cause a potential UAF at the error message in azxvssetstate() since the card object is already gone; this was the original report by Sashiko.)
For avoiding the unneeded crash, it's better to avoid the card release in this error path, so we make azxprobecontinue() behaving conditionally. In return, set hda->initfailed flag, so that any further (re-)attempts will be filtered after that point.
The check of hda->initfailed is dropped from azxvscanswitch(). It's because otherwise vgaswitcheroo can't be switched to turn off GPU once when a probe error happens at the audio side.
Affected Software
Event History
Frequently Asked Questions
What condition is required to trigger the issue?
The issue occurs when the vga_switcheroo handler enables audio and azx_probe_continue() encounters an error during probing. The error path can release the sound card while vga_switcheroo_process_delayed_switch() already holds vgasr_mutex.
What are the potential effects of the faulty error path?
It can cause a deadlock when card release re-enters vga_switcheroo_unregister_client() and attempts to lock vgasr_mutex again. It can also lead to a potential use-after-free when azx_vs_set_state() accesses the already released card object for error reporting.
How does the resolved behavior handle a probe failure?
The card is no longer released on this probe-error path. The HDA device is instead marked with init_failed, preventing further initialization or reinitialization attempts while still allowing vga_switcheroo to switch off the GPU.