CVE-2023-54178
Description
In the Linux kernel, the following vulnerability has been resolved:
of: unittest: fix null pointer dereferencing in of_unittest_find_node_by_name()
when kmalloc() fail to allocate memory in kasprintf(), name or full_name will be NULL, strcmp() will cause null pointer dereference.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A null pointer dereference in Linux kernel's of_unittest_find_node_by_name() when kmalloc fails, leading to a potential crash.
Vulnerability
Overview
CVE-2023-54178 is a null pointer dereference vulnerability in the Linux kernel's Device Tree (OF) unit test function of_unittest_find_node_by_name(). The root cause is that the function uses kasprintf() to allocate memory for the name and full_name strings, but does not check if the allocation succeeds. If kmalloc() fails, kasprintf() returns NULL, and the subsequent strcmp() call dereferences the NULL pointer, causing a kernel crash [1][2].
Exploitation
This vulnerability is triggered during the execution of the OF unit tests, which are typically run during kernel self-tests or debugging. An attacker would need to be able to influence memory allocation to cause kmalloc() to fail, for example by exhausting system memory. The attack surface is limited to systems where the OF unit tests are enabled and executed, and the attacker must have some ability to affect kernel memory pressure [3][4].
Impact
Impact
A successful exploitation leads to a denial of service (DoS) via a kernel NULL pointer dereference, resulting in a system crash or hang. The vulnerability does not allow for privilege escalation or arbitrary code execution, as it only causes a panic when the NULL pointer is accessed memory is unmapped [1][2].
Mitigation
The fix has been applied to the Linux kernel stable branches. Users should update to a kernel version containing the commit that adds a NULL check before the strcmp() call. No workaround is available other than applying the patch or disabling the OF unit tests if they are not needed [3][4].
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
9c364fa869b330b7d71551191dadf0d0dfcc8f41c65f8d05bea5bc6f5aa0943cc228099c5c74ae8124f962dd8ee9de71ad6ce4f0ea19cVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
9- git.kernel.org/stable/c/0b7d715511915a1b39f5fdcbe57a7922dfd66513nvd
- git.kernel.org/stable/c/2dd8ee9de71ad8447f8459fb01dade7f6c7132danvd
- git.kernel.org/stable/c/43cc228099c514467b8074d7ede6673cef9f33b9nvd
- git.kernel.org/stable/c/c364fa869b33ca42a263bf91c22fce7e6c61d479nvd
- git.kernel.org/stable/c/c74ae8124f9687062dd99858f34c9d027ddd73danvd
- git.kernel.org/stable/c/d6ce4f0ea19c32f10867ed93d8386924326ab474nvd
- git.kernel.org/stable/c/dadf0d0dfcc81cdcb27ba5426676d13a9e4fb925nvd
- git.kernel.org/stable/c/ea5bc6f5aa099e3e84d037282836234ad77cba88nvd
- git.kernel.org/stable/c/f41c65f8d05be734898cbe72af59a401b97d298anvd
News mentions
0No linked articles in our index yet.