CVE-2026-139477: ALSA: info: Fix memory leak at card removal
In the Linux kernel, the following vulnerability has been resolved:
ALSA: info: Fix memory leak at card removal
The fix for potential deadlock at disconnection by the commit c7a606519533 ("ALSA: info: Fix potential deadlock at disconnection") clears card->procroot pointer at sndinfocarddisconnect(), in order just to be sure. But this leads to a memory leak of card->procroot content that should have been released at a later call of sndinfocardfree().
For addressing the memory leak, simply drop the card->procroot clearance at sndinfocarddisconnect().
Since card->procroot might be still looked at in sndinfocardidchange() that may be running concurrently during the connection procedure, add a sanity check there, too.
Affected Software
Event History
Frequently Asked Questions
When can this leak occur?
The leak can occur when an ALSA card is removed or disconnected after a change that clears card->proc_root in snd_info_card_disconnect(). Clearing that pointer prevents its contents from being released later by snd_info_card_free().
Is there a concurrent-operation consideration in the fix?
Yes. card->proc_root may still be examined by snd_info_card_id_change() while a connection procedure is running concurrently, so the fix adds a sanity check there.