Skip to contentSkip to conversation

CVE-2025-38143: backlight: pm8941: Add NULL check in wled_configure()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jul 3, 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:

backlight: pm8941: Add NULL check in wled_configure()

devm_kasprintf() returns NULL when memory allocation fails. Currently, wled_configure() does not check for this case, which results in a NULL pointer dereference.

Add NULL check after devm_kasprintf() to prevent this issue.

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

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

	Issue introduced in 5.0 with commit f86b77583d88c8402e8d89a339d96f847318f8a8 and fixed in 5.10.239 with commit 6a56446595730a5e3f06a30902e23cb037d28146
	Issue introduced in 5.0 with commit f86b77583d88c8402e8d89a339d96f847318f8a8 and fixed in 5.15.186 with commit 9d06ac32c202142da40904180f2669ed4f5073ac
	Issue introduced in 5.0 with commit f86b77583d88c8402e8d89a339d96f847318f8a8 and fixed in 6.1.142 with commit 21528806560510458378ea52c37e35b0773afaea
	Issue introduced in 5.0 with commit f86b77583d88c8402e8d89a339d96f847318f8a8 and fixed in 6.6.94 with commit fde314445332015273c8f51d2659885c606fe135
	Issue introduced in 5.0 with commit f86b77583d88c8402e8d89a339d96f847318f8a8 and fixed in 6.12.34 with commit 1be2000b703b02e149f8f2061054489f6c18c972
	Issue introduced in 5.0 with commit f86b77583d88c8402e8d89a339d96f847318f8a8 and fixed in 6.15.3 with commit 4a715be3fe80b68fa55cb3569af3d294be101626
	Issue introduced in 5.0 with commit f86b77583d88c8402e8d89a339d96f847318f8a8 and fixed in 6.16-rc1 with commit e12d3e1624a02706cdd3628bbf5668827214fa33

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

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/video/backlight/qcom-wled.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/6a56446595730a5e3f06a30902e23cb037d28146
	https://git.kernel.org/stable/c/9d06ac32c202142da40904180f2669ed4f5073ac
	https://git.kernel.org/stable/c/21528806560510458378ea52c37e35b0773afaea
	https://git.kernel.org/stable/c/fde314445332015273c8f51d2659885c606fe135
	https://git.kernel.org/stable/c/1be2000b703b02e149f8f2061054489f6c18c972
	https://git.kernel.org/stable/c/4a715be3fe80b68fa55cb3569af3d294be101626
	https://git.kernel.org/stable/c/e12d3e1624a02706cdd3628bbf5668827214fa33