Skip to contentSkip to conversation

CVE-2026-99467: media: marvell: mcam: stop DMA and cancel s_bh_work before freeing DMA buffers

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 19

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

media: marvell: mcam: stop DMA and cancel s_bh_work before freeing DMA buffers

In vmalloc mode the frame-completion IRQ queues mcam_frame_work() on cam->s_bh_work, which memcpy()s from the dma_bufs[] that mcam_free_dma_bufs() frees with dma_free_coherent(). mccic_shutdown() frees those buffers without stopping the controller, so while streaming a late frame IRQ can re-arm the work after the buffers are gone, causing a use-after-free.

Stop the controller in mccic_shutdown() when streaming is still active (gated on an open fd, which holds a runtime-PM reference, so the device is powered), cancel s_bh_work in mcam_free_dma_bufs(), and move INIT_WORK() into mccic_register() before the device can be published.

The Linux kernel CVE team has assigned CVE-2026-99467 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 3.1 with commit 67a8dbbc4e04cd256987b189352472a59aff73be and fixed in 6.12.117 with commit 8445398f75ed573cd8eafaa01273c10990e05eae
	Issue introduced in 3.1 with commit 67a8dbbc4e04cd256987b189352472a59aff73be and fixed in 6.18.61 with commit 12d0222809f943d9bcaffd5fe1d8b9d2c3c74f07
	Issue introduced in 3.1 with commit 67a8dbbc4e04cd256987b189352472a59aff73be and fixed in 7.3.2 with commit 71de8e33596c9c8b3e20e51e18883e6c5f25f7a4
	Issue introduced in 3.1 with commit 67a8dbbc4e04cd256987b189352472a59aff73be and fixed in 7.4-rc1 with commit 0f29f84317c1e35f6a9265277be33e60d3fc8c1c

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-99467

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/platform/marvell/mcam-core.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/8445398f75ed573cd8eafaa01273c10990e05eae
	https://git.kernel.org/stable/c/12d0222809f943d9bcaffd5fe1d8b9d2c3c74f07
	https://git.kernel.org/stable/c/71de8e33596c9c8b3e20e51e18883e6c5f25f7a4
	https://git.kernel.org/stable/c/0f29f84317c1e35f6a9265277be33e60d3fc8c1c