Skip to contentSkip to conversation

CVE-2026-45978: staging: greybus: lights: avoid NULL deref

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 27

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: greybus: lights: avoid NULL deref

gb_lights_light_config() stores channel_count before allocating the channels array. If kcalloc() fails, gb_lights_release() iterates the non-zero count and dereferences light->channels, which is NULL.

Allocate channels first and only then publish channels_count so the cleanup path can't walk a NULL pointer.

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

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

	Issue introduced in 4.9 with commit 2870b52bae4c81823ffcb3ed2b0626fb39d64f48 and fixed in 5.10.252 with commit a118724d7641b832fa14323e2733e28ae4834552
	Issue introduced in 4.9 with commit 2870b52bae4c81823ffcb3ed2b0626fb39d64f48 and fixed in 5.15.202 with commit 3cbe694d235d96f628ec7dc6ae4d8bdddb768699
	Issue introduced in 4.9 with commit 2870b52bae4c81823ffcb3ed2b0626fb39d64f48 and fixed in 6.1.165 with commit ba5022162da63059bae36c4fd84d7031f582c71f
	Issue introduced in 4.9 with commit 2870b52bae4c81823ffcb3ed2b0626fb39d64f48 and fixed in 6.6.128 with commit 65f2c608096d766540953d9b170d216aa3b5eb95
	Issue introduced in 4.9 with commit 2870b52bae4c81823ffcb3ed2b0626fb39d64f48 and fixed in 6.12.75 with commit 01b91cb3e748032fd96bbe0043812b426a52f091
	Issue introduced in 4.9 with commit 2870b52bae4c81823ffcb3ed2b0626fb39d64f48 and fixed in 6.18.14 with commit 06162d85f830582da6e9e5fcf9c9504d6da9ae0b
	Issue introduced in 4.9 with commit 2870b52bae4c81823ffcb3ed2b0626fb39d64f48 and fixed in 6.19.4 with commit da46264a7016034a5bbbad034c012ef218b7d0af
	Issue introduced in 4.9 with commit 2870b52bae4c81823ffcb3ed2b0626fb39d64f48 and fixed in 7.0 with commit efcffd9a6ad8d190651498d5eda53bfc7cf683a7

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

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/greybus/light.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/a118724d7641b832fa14323e2733e28ae4834552
	https://git.kernel.org/stable/c/3cbe694d235d96f628ec7dc6ae4d8bdddb768699
	https://git.kernel.org/stable/c/ba5022162da63059bae36c4fd84d7031f582c71f
	https://git.kernel.org/stable/c/65f2c608096d766540953d9b170d216aa3b5eb95
	https://git.kernel.org/stable/c/01b91cb3e748032fd96bbe0043812b426a52f091
	https://git.kernel.org/stable/c/06162d85f830582da6e9e5fcf9c9504d6da9ae0b
	https://git.kernel.org/stable/c/da46264a7016034a5bbbad034c012ef218b7d0af
	https://git.kernel.org/stable/c/efcffd9a6ad8d190651498d5eda53bfc7cf683a7