CVE-2026-99504: ASoC: audio-graph-card2: Fix use-after-free in audio_graph2_link_c2c()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ASoC: audio-graph-card2: Fix use-after-free in audio_graph2_link_c2c()
of_graph_get_next_port() consumes the reference of its prev argument. port0 is only borrowed from the caller's iterator, so the call drops a reference the function does not own, and port0 is dereferenced again afterwards. Pass an extra reference, as graph_count_c2c() does, so the reference the callee consumes is the one taken here.
The Linux kernel CVE team has assigned CVE-2026-99504 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.14 with commit 5f281c3e82b1203c40cf6ead009ffb5b09db056b and fixed in 6.18.61 with commit fd0dd0ee82ef62b8b4bda1ffceb361946f403404 Issue introduced in 6.14 with commit 5f281c3e82b1203c40cf6ead009ffb5b09db056b and fixed in 7.3.2 with commit 85db2c35fd93bc6604e4d7abe4701d6587bc15a3 Issue introduced in 6.14 with commit 5f281c3e82b1203c40cf6ead009ffb5b09db056b and fixed in 7.4-rc1 with commit 5ea495bccfd746b063bc6702064f167467717b41
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-99504
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/soc/generic/audio-graph-card2.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/fd0dd0ee82ef62b8b4bda1ffceb361946f403404 https://git.kernel.org/stable/c/85db2c35fd93bc6604e4d7abe4701d6587bc15a3 https://git.kernel.org/stable/c/5ea495bccfd746b063bc6702064f167467717b41