CVE-2024-39481: media: mc: Fix graph walk in media_pipeline_start
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
media: mc: Fix graph walk in media_pipeline_start
The graph walk tries to follow all links, even if they are not between pads. This causes a crash with, e.g. a MEDIA_LNK_FL_ANCILLARY_LINK link.
Fix this by allowing the walk to proceed only for MEDIA_LNK_FL_DATA_LINK links.
The Linux kernel CVE team has assigned CVE-2024-39481 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.1 with commit ae219872834a and fixed in 6.1.94 with commit 788fd0f11e45 Issue introduced in 6.1 with commit ae219872834a and fixed in 6.6.34 with commit e80d9db99b7b Issue introduced in 6.1 with commit ae219872834a and fixed in 6.9.5 with commit bee9440bc0b6 Issue introduced in 6.1 with commit ae219872834a and fixed in 6.10-rc1 with commit 8a9d420149c4
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-2024-39481
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:
drivers/media/mc/mc-entity.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/788fd0f11e45ae8d3a8ebbd3452a6e83f92db376 https://git.kernel.org/stable/c/e80d9db99b7b6c697d8d952dfd25c3425cf61499 https://git.kernel.org/stable/c/bee9440bc0b6b3b7432f7bfde28656262a3484a2 https://git.kernel.org/stable/c/8a9d420149c477e7c97fbd6453704e4612bdd3fa