Skip to contentSkip to conversation

CVE-2025-37971: staging: bcm2835-camera: Initialise dev in v4l2_dev

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 20, 2025

lore
Share & tools
lore
#0 lore raw

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

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

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

staging: bcm2835-camera: Initialise dev in v4l2_dev

Commit 42a2f6664e18 ("staging: vc04_services: Move global g_state to vchiq_state") changed mmal_init to pass dev->v4l2_dev.dev to vchiq_mmal_init, however nothing iniitialised dev->v4l2_dev, so we got a NULL pointer dereference.

Set dev->v4l2_dev.dev during bcm2835_mmal_probe. The device pointer could be passed into v4l2_device_register to set it, however that also has other effects that would need additional changes.

The Linux kernel CVE team has assigned CVE-2025-37971 to this issue.

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

	Issue introduced in 6.10 with commit 42a2f6664e18874302623f31edef545ef41e1d14 and fixed in 6.12.29 with commit 06753f49336ab161ea0e249a0720125b81b7b31b
	Issue introduced in 6.10 with commit 42a2f6664e18874302623f31edef545ef41e1d14 and fixed in 6.14.7 with commit b70bdd4923e8b8edbacde2af83ca337bb7005261
	Issue introduced in 6.10 with commit 42a2f6664e18874302623f31edef545ef41e1d14 and fixed in 6.15-rc6 with commit 98698ca0e58734bc5c1c24e5bbc7429f981cd186

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-2025-37971

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/staging/vc04_services/bcm2835-camera/bcm2835-camera.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/06753f49336ab161ea0e249a0720125b81b7b31b
	https://git.kernel.org/stable/c/b70bdd4923e8b8edbacde2af83ca337bb7005261
	https://git.kernel.org/stable/c/98698ca0e58734bc5c1c24e5bbc7429f981cd186