CVE-2025-40030
Description
In the Linux kernel, the following vulnerability has been resolved:
pinctrl: check the return value of pinmux_ops::get_function_name()
While the API contract in docs doesn't specify it explicitly, the generic implementation of the get_function_name() callback from struct pinmux_ops - pinmux_generic_get_function_name() - can fail and return NULL. This is already checked in pinmux_check_ops() so add a similar check in pinmux_func_name_to_selector() instead of passing the returned pointer right down to strcmp() where the NULL can get dereferenced. This is normal operation when adding new pinfunctions.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A NULL pointer dereference in Linux kernel's pinctrl subsystem occurs when pinmux_func_name_to_selector() passes a NULL from get_function_name() to strcmp().
Vulnerability
Overview
A NULL pointer dereference vulnerability exists in the Linux kernel's pinctrl subsystem. The function pinmux_func_name_to_selector() passes the return value of pinmux_ops::get_function_name() directly to strcmp() without first checking for NULL. While the API contract does not explicitly require a non-NULL return, the generic implementation pinmux_generic_get_function_name() can fail and return NULL, leading to a potential NULL dereference when strcmp() is called on the returned pointer [1]. This condition can occur during normal operation when new pin functions are being added.
Attack
Vector and Prerequisites
An attacker would need local access to the system and the ability to trigger the addition of new pin functions that cause the get_function_name() callback to fail. The vulnerability is reachable through normal kernel operations involving pinmux configuration, no special privileges beyond those needed to interact with the pinctrl subsystem are required. The issue lies in the missing return value validation in a code path that was already partially checked elsewhere in pinmux_check_ops(), but the NULL can still propagate to pinmux_func_name_to_selector() [2].
Impact
Successful exploitation could result in a denial of service (system crash or kernel panic) due to the NULL pointer dereference. The bug does not appear to allow arbitrary code execution or privilege escalation, as the dereference occurs in kernel context and would typically lead to an oops. However, it could be used as a local denial of service vector in environments where untrusted users can influence pin function registration.
Mitigation
Status
Patches have been committed to the Linux kernel stable trees. The fix adds a NULL check on the return value of get_function_name() before passing it to strcmp(), preventing the dereference [3]. System administrators should apply the relevant stable kernel updates for affected kernels.
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
81a7fc8fed2bbe7265dc4c670d77ef2f621cdba7f7c2b2b321a2ea887a5cd688c688e0bf5b7e0535060a64002ee98c022Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- git.kernel.org/stable/c/1a2ea887a5cd7d47bab599f733d89444df018b1anvd
- git.kernel.org/stable/c/1a7fc8fed2bb2e113604fde7a45432ace2056b97nvd
- git.kernel.org/stable/c/4002ee98c022d671ecc1e4a84029e9ae7d8a5603nvd
- git.kernel.org/stable/c/688c688e0bf55824f4a38f8c2180046f089a3e3bnvd
- git.kernel.org/stable/c/b7e0535060a60cc99eafc19cc665d979714cd73anvd
- git.kernel.org/stable/c/ba7f7c2b2b3261e7def67018c38c69b626e0e66envd
- git.kernel.org/stable/c/d77ef2f621cd1d605372c4c6ce667c496f6990c3nvd
- git.kernel.org/stable/c/e7265dc4c670b89611bcf5fe33acf99bc0aa294fnvd
News mentions
0No linked articles in our index yet.