{"id":"CVE-2026-139474","state":"PUBLISHED","title":"ASoC: mediatek: Don't keep a freed topology name in the static card","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nASoC: mediatek: Don't keep a freed topology name in the static card\n\nThe machine drivers pass a static snd_soc_card, which outlives any one\nprobe. With SOF, mtk_soundcard_common_probe() calls\nsnd_soc_card_set_topology_name(), which devm-allocates \"sof-<name>\",\nstores it in card->topology_shortname and points card->name at it.\n\nIf the probe then fails or defers, devm frees the string, but the static\ncard keeps both pointers. The next probe does not allocate a new name,\nbecause topology_shortname is already set, so the card registers with\nwhatever now occupies that memory:\n\n  input: \\xc0cr\\xc2 DP Jack as /devices/platform/sound/sound/card0/input10\n\nUCM matches profiles by card name, so userspace then finds no profile and\nthe card is unusable until the next boot.\n\nSave the original name before setting the topology name, and restore it\nfrom a devm action that runs before the string is freed.","publishedAt":"2026-11-30T13:35:05.205Z","updatedAt":"2026-11-30T13:35:05.205Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ec4489c43efe434a132f27ff9298345de1cfacd8","status":"affected","lessThan":"bf389db13cf825a50767cc1110034d15e55ec061","versionType":"git"},{"version":"ec4489c43efe434a132f27ff9298345de1cfacd8","status":"affected","lessThan":"50c5d7f3a9b4d2a2baca40657e46a3508cdac2d1","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["sound/soc/mediatek/common/mtk-soundcard-driver.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.2","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["sound/soc/mediatek/common/mtk-soundcard-driver.c"]}],"references":["https://git.kernel.org/stable/c/bf389db13cf825a50767cc1110034d15e55ec061","https://git.kernel.org/stable/c/50c5d7f3a9b4d2a2baca40657e46a3508cdac2d1"],"weaknesses":[],"ingestedAt":"2026-11-30T13:50:04.417Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139474.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139474","state":"PUBLISHED","datePublished":"2026-11-30T13:35:05.205Z","dateUpdated":"2026-11-30T13:35:05.205Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.936Z"},"containers":{"cna":{"title":"ASoC: mediatek: Don't keep a freed topology name in the static card","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nASoC: mediatek: Don't keep a freed topology name in the static card\n\nThe machine drivers pass a static snd_soc_card, which outlives any one\nprobe. With SOF, mtk_soundcard_common_probe() calls\nsnd_soc_card_set_topology_name(), which devm-allocates \"sof-<name>\",\nstores it in card->topology_shortname and points card->name at it.\n\nIf the probe then fails or defers, devm frees the string, but the static\ncard keeps both pointers. The next probe does not allocate a new name,\nbecause topology_shortname is already set, so the card registers with\nwhatever now occupies that memory:\n\n  input: \\xc0cr\\xc2 DP Jack as /devices/platform/sound/sound/card0/input10\n\nUCM matches profiles by card name, so userspace then finds no profile and\nthe card is unusable until the next boot.\n\nSave the original name before setting the topology name, and restore it\nfrom a devm action that runs before the string is freed."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ec4489c43efe434a132f27ff9298345de1cfacd8","status":"affected","lessThan":"bf389db13cf825a50767cc1110034d15e55ec061","versionType":"git"},{"version":"ec4489c43efe434a132f27ff9298345de1cfacd8","status":"affected","lessThan":"50c5d7f3a9b4d2a2baca40657e46a3508cdac2d1","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["sound/soc/mediatek/common/mtk-soundcard-driver.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.2","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["sound/soc/mediatek/common/mtk-soundcard-driver.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/bf389db13cf825a50767cc1110034d15e55ec061"},{"url":"https://git.kernel.org/stable/c/50c5d7f3a9b4d2a2baca40657e46a3508cdac2d1"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:35:05.205Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.2","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.2","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}