CVE-2025-38007: HID: uclogic: Add NULL check in uclogic_input_configured()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
HID: uclogic: Add NULL check in uclogic_input_configured()
devm_kasprintf() returns NULL when memory allocation fails. Currently, uclogic_input_configured() 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-38007 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.1.53 with commit f283805d984343b2f216e2f4c6c7af265b9542ae and fixed in 6.1.140 with commit 01b76cc8ca243fc3376b035aa326bbc4f03d384b Issue introduced in 6.6 with commit dd613a4e45f8d35f49a63a2064e5308fa5619e29 and fixed in 6.6.92 with commit ad6caaf29bc26a48b1241ce82561fcbcf0a75aa9 Issue introduced in 6.6 with commit dd613a4e45f8d35f49a63a2064e5308fa5619e29 and fixed in 6.12.30 with commit 94e7272b636a0677082e0604609e4c471e0a2caf Issue introduced in 6.6 with commit dd613a4e45f8d35f49a63a2064e5308fa5619e29 and fixed in 6.14.8 with commit b616453d719ee1b8bf2ea6f6cc6c6258a572a590 Issue introduced in 6.6 with commit dd613a4e45f8d35f49a63a2064e5308fa5619e29 and fixed in 6.15 with commit bd07f751208ba190f9b0db5e5b7f35d5bb4a8a1e Issue introduced in 6.4.16 with commit 4c2707dfee5847dc0b5ecfbe512c29c93832fdc4 Issue introduced in 6.5.3 with commit 58f0d1c0e494a88f301bf455da7df4366f179bbb
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-38007
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/hid/hid-uclogic-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/01b76cc8ca243fc3376b035aa326bbc4f03d384b https://git.kernel.org/stable/c/ad6caaf29bc26a48b1241ce82561fcbcf0a75aa9 https://git.kernel.org/stable/c/94e7272b636a0677082e0604609e4c471e0a2caf https://git.kernel.org/stable/c/b616453d719ee1b8bf2ea6f6cc6c6258a572a590 https://git.kernel.org/stable/c/bd07f751208ba190f9b0db5e5b7f35d5bb4a8a1e