CVE-2026-74502: ALSA: ump: fix double free of out_cvts on rawmidi error
Greg Kroah-Hartman <[email protected]>
| Newsgroups | org.kernel.vger.linux-cve-announce |
|---|---|
| Message-ID | <2026081541-CVE-2026-74502-5720@gregkh> |
From: Greg Kroah-Hartman <[email protected]> Description =========== In the Linux kernel, the following vulnerability has been resolved: ALSA: ump: fix double free of out_cvts on rawmidi error snd_ump_attach_legacy_rawmidi() allocates the legacy conversion array ump->out_cvts and, on the snd_rawmidi_new() error path, frees it with kfree() but leaves ump->out_cvts pointing at the freed memory. When the endpoint is later torn down, snd_ump_endpoint_free() frees ump->out_cvts a second time, resulting in a double free. The host snd-usb-audio driver attaches the legacy rawmidi for any USB MIDI 2.0 (UMP) device, so a device that makes snd_rawmidi_new() fail reaches this path on enumeration. Clear ump->out_cvts after freeing it on the error path so it is not freed again during teardown. Discovered by XBOW, triaged by Baul Lee <[email protected]> The Linux kernel CVE team has assigned CVE-2026-74502 to this issue. Affected and fixed versions =========================== Issue introduced in 6.5 with commit 33cd7630782df2230529c3e8f1a6d0ae9cd6ab49 and fixed in 6.6.151 with commit e84d2e53a05c78a04d1343eeb0f31a79456e79fc Issue introduced in 6.5 with commit 33cd7630782df2230529c3e8f1a6d0ae9cd6ab49 and fixed in 6.12.103 with commit 3302aaeac4f7ee6b775850db21d5f61064ce70ad Issue introduced in 6.5 with commit 33cd7630782df2230529c3e8f1a6d0ae9cd6ab49 and fixed in 6.18.44 with commit 032746c2dd9a4ea0774b04ac8a29e2ea628f106e Issue introduced in 6.5 with commit 33cd7630782df2230529c3e8f1a6d0ae9cd6ab49 and fixed in 7.1.8 with commit c57001f55f97ef856fb6527e376c5c4a056a53a4 Issue introduced in 6.5 with commit 33cd7630782df2230529c3e8f1a6d0ae9cd6ab49 and fixed in 7.2-rc6 with commit 70c977815af0d997feb2d0c5d284d55689bf7051 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-74502 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: sound/core/ump.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/e84d2e53a05c78a04d1343eeb0f31a79456e79fc https://git.kernel.org/stable/c/3302aaeac4f7ee6b775850db21d5f61064ce70ad https://git.kernel.org/stable/c/032746c2dd9a4ea0774b04ac8a29e2ea628f106e https://git.kernel.org/stable/c/c57001f55f97ef856fb6527e376c5c4a056a53a4 https://git.kernel.org/stable/c/70c977815af0d997feb2d0c5d284d55689bf7051