CVE-2026-139474: ASoC: mediatek: Don't keep a freed topology name in the static card
In the Linux kernel, the following vulnerability has been resolved:
ASoC: mediatek: Don't keep a freed topology name in the static card
The machine drivers pass a static sndsoccard, which outlives any one probe. With SOF, mtksoundcardcommonprobe() calls sndsoccardsettopologyname(), which devm-allocates "sof-<name>", stores it in card->topologyshortname and points card->name at it.
If the probe then fails or defers, devm frees the string, but the static card keeps both pointers. The next probe does not allocate a new name, because topologyshortname is already set, so the card registers with whatever now occupies that memory:
input: \xc0cr\xc2 DP Jack as /devices/platform/sound/sound/card0/input10
UCM matches profiles by card name, so userspace then finds no profile and the card is unusable until the next boot.
Save the original name before setting the topology name, and restore it from a devm action that runs before the string is freed.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In mtk_soundcard_common_probe(), save the original card name before calling snd_soc_card_set_topology_name(), then restore it with a devm action that runs before the topology name string is freed.
Event History
Frequently Asked Questions
When can this issue occur?
It can occur when a MediaTek ASoC machine-driver probe using SOF fails or is deferred after setting the topology name. Because the sound card structure is static and survives the failed probe, a subsequent probe can reuse dangling name pointers.
What is the practical impact on an affected system?
The sound card may register with corrupted or unrelated memory as its name. Since UCM selects profiles by card name, userspace may not find a matching profile and the audio card can be unusable until the next reboot.
How can I identify a system that has encountered the problem?
Check whether the registered sound card has an unexpected or corrupted name, such as an input-device-style string, and whether UCM fails to locate a profile for that card. The example behavior includes a card appearing with a name like "input: … DP Jack".
Is a reboot an effective workaround?
A reboot can restore usability temporarily, because the described card-name corruption persists until the next boot. The resolved fix preserves and restores the original card name when the probe cleanup runs.