{"id":"CVE-2024-39481","state":"PUBLISHED","title":"media: mc: Fix graph walk in media_pipeline_start","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: mc: Fix graph walk in media_pipeline_start\n\nThe graph walk tries to follow all links, even if they are not between\npads. This causes a crash with, e.g. a MEDIA_LNK_FL_ANCILLARY_LINK link.\n\nFix this by allowing the walk to proceed only for MEDIA_LNK_FL_DATA_LINK\nlinks.","publishedAt":"2024-07-05T06:55:09.916Z","updatedAt":"2026-08-05T11:33:35.153Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ae219872834a32da88408a92a4b4745c11f5a7ce","status":"affected","lessThan":"788fd0f11e45ae8d3a8ebbd3452a6e83f92db376","versionType":"git"},{"version":"ae219872834a32da88408a92a4b4745c11f5a7ce","status":"affected","lessThan":"e80d9db99b7b6c697d8d952dfd25c3425cf61499","versionType":"git"},{"version":"ae219872834a32da88408a92a4b4745c11f5a7ce","status":"affected","lessThan":"bee9440bc0b6b3b7432f7bfde28656262a3484a2","versionType":"git"},{"version":"ae219872834a32da88408a92a4b4745c11f5a7ce","status":"affected","lessThan":"8a9d420149c477e7c97fbd6453704e4612bdd3fa","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/mc/mc-entity.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.1","versionType":"semver"},{"version":"6.1.94","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.34","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.9.5","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/mc/mc-entity.c"]}],"references":["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"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:39.287Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/39xxx/CVE-2024-39481.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-39481","state":"PUBLISHED","datePublished":"2024-07-05T06:55:09.916Z","dateUpdated":"2026-08-05T11:33:35.153Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-06-25T14:23:23.746Z"},"containers":{"cna":{"title":"media: mc: Fix graph walk in media_pipeline_start","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: mc: Fix graph walk in media_pipeline_start\n\nThe graph walk tries to follow all links, even if they are not between\npads. This causes a crash with, e.g. a MEDIA_LNK_FL_ANCILLARY_LINK link.\n\nFix this by allowing the walk to proceed only for MEDIA_LNK_FL_DATA_LINK\nlinks."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ae219872834a32da88408a92a4b4745c11f5a7ce","status":"affected","lessThan":"788fd0f11e45ae8d3a8ebbd3452a6e83f92db376","versionType":"git"},{"version":"ae219872834a32da88408a92a4b4745c11f5a7ce","status":"affected","lessThan":"e80d9db99b7b6c697d8d952dfd25c3425cf61499","versionType":"git"},{"version":"ae219872834a32da88408a92a4b4745c11f5a7ce","status":"affected","lessThan":"bee9440bc0b6b3b7432f7bfde28656262a3484a2","versionType":"git"},{"version":"ae219872834a32da88408a92a4b4745c11f5a7ce","status":"affected","lessThan":"8a9d420149c477e7c97fbd6453704e4612bdd3fa","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/mc/mc-entity.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.1","versionType":"semver"},{"version":"6.1.94","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.34","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.9.5","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/media/mc/mc-entity.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/788fd0f11e45ae8d3a8ebbd3452a6e83f92db376"},{"url":"https://git.kernel.org/stable/c/e80d9db99b7b6c697d8d952dfd25c3425cf61499"},{"url":"https://git.kernel.org/stable/c/bee9440bc0b6b3b7432f7bfde28656262a3484a2"},{"url":"https://git.kernel.org/stable/c/8a9d420149c477e7c97fbd6453704e4612bdd3fa"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable graph walk is reached only through VIDIOC_STREAMON (and equivalent driver streaming paths) on a local V4L2 device node such as /dev/video0, with the topology further influenced via /dev/media0 ioctls. There is no network or adjacent-network path into media_pipeline_start().\nAC:L - On any affected system the ancillary link is created at probe time by the sensor/lens binding, so the attacker only has to open the video node and issue a single STREAMON to make the walk dereference the ancillary link — it is deterministic, with no race to win and no memory-layout preconditions.\nPR:L - Opening /dev/videoN requires only unprivileged local access that is routinely granted — systemd's uaccess udev rule gives the logged-in seat user ACL access to video4linux nodes, embedded systems use the `video` group, and on Android the camera service holds it. No capability check exists anywhere on the path from the ioctl to media_pipeline_explore_next_link().\nUI:N - The attacker performs the entire sequence themselves — open the device, optionally configure links/formats, then STREAMON. No action by any other user is needed.\nS:U - The type confusion, the wild dereferences, and the out-of-bounds pointer write all occur within kernel memory under the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Reading a struct media_entity as a struct media_pad makes the walk follow pointers harvested from wrong offsets inside struct v4l2_subdev (name+32, name+80), and the resulting pad->pipe write corrupts num_pads/num_links/num_backlinks — counts that subsequently drive entity->pads[] indexing and are copied to userspace through MEDIA_IOC_ENUM_LINKS/G_TOPOLOGY, disclosing kernel heap pointer bytes and out-of-bounds memory.\nI:H - This is a genuine type confusion that produces an 8-byte kernel-pointer write at offset 56 of a live media_entity (pad->pipe = pipe, and pad->pipe = NULL on stop), clobbering adjacent metadata fields and giving an attacker-influenced corruption primitive rather than a mere read fault.\nA:H - The commit message states outright that the unfiltered walk \"causes a crash\" with an ancillary link; the confused pointers are dereferenced in the DFS loop and in dev_dbg, producing a kernel oops on STREAMON that is trivially repeatable."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:33:35.153Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.1.94"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.6.34"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.9.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.10"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-07-05T20:07:40.257709Z","id":"CVE-2024-39481","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-07-05T20:07:53.742Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/788fd0f11e45ae8d3a8ebbd3452a6e83f92db376","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/e80d9db99b7b6c697d8d952dfd25c3425cf61499","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/bee9440bc0b6b3b7432f7bfde28656262a3484a2","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/8a9d420149c477e7c97fbd6453704e4612bdd3fa","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T04:26:15.883Z"}}]}}}