CVE-2026-99717 in Linux
Summary
by MITRE • 11/20/2026
In the Linux kernel, the following vulnerability has been resolved:
hwmon: (pmbus/q54sj108a2) Add missing NULL pointer check
When CONFIG_DEBUG_FS is enabled and per-client PMBus debugfs directory creation fails during pmbus_do_probe(), q54sj108a2_probe() passes the NULL pointer returned by pmbus_get_debugfs_dir() to debugfs_create_dir() without validation, creating its debugfs directory at the debugfs root instead of under the client directory.
If pmbus_init_debugfs() fails to create the client directory, data->debugfs is left as NULL or an ERR_PTR, which pmbus_get_debugfs_dir() converts to NULL. Passing a NULL parent to debugfs_create_dir() places q54sj108a2_dir in the root of the debugfs filesystem and populates it with attribute files whose private data pointers reference psu->debugfs_entries. Because this root-level directory is outside the client debugfs hierarchy, PMBus core cleanup does not remove it on device unbind, leaking the debugfs entries and causing a use-after-free of the devm-allocated struct q54sj108a2_data if the orphaned files are accessed via q54sj108a2_debugfs_read() or q54sj108a2_debugfs_write() after device removal.
Fix the problem by adding the missing NULL pointer check.
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 11/21/2026
The vulnerability identified in the Linux kernel driver for the PMBus Q54SJ108A2 power supply unit involves a critical logic error during the initialization of debug filesystem entries when CONFIG_DEBUG_FS is enabled. The core issue stems from an insufficient validation of return values obtained during the probe phase of the device driver. Specifically, the function pmbus_get_debugfs_dir() may return NULL if it fails to create or locate the appropriate per-client directory structure within the debugfs hierarchy. In a properly secured implementation, such failures must be handled gracefully to prevent subsequent operations from proceeding with invalid pointers. However, in this specific instance of the q54sj108a2_probe function, the code proceeds to pass this NULL pointer directly as the parent argument to debugfs_create_dir(). This lack of validation represents a fundamental failure in input sanitization and error handling logic within the kernel space driver code.
From a technical perspective, passing a NULL parent directory to debugfs_create_dir() results in the creation of new files at the root level of the entire debugfs filesystem rather than under the intended client-specific subdirectory. This misplacement is not merely cosmetic; it fundamentally breaks the expected hierarchical relationship between the device instance and its associated debugging artifacts. The newly created directory contains attribute files that store private data pointers referencing structures allocated for the specific power supply unit, namely psu->debugfs_entries. Because these entries are tied to the lifecycle of the hardware device rather than the global debugfs namespace, their placement at the root level creates a dangerous decoupling between the resource management and the file system objects that access them.
The operational impact of this flaw is severe, primarily manifesting as a use-after-free vulnerability coupled with memory leaks. When the PMBus core attempts to clean up resources during device unbind or removal, it relies on the assumption that all debugfs entries are contained within the client-specific directory structure so they can be systematically removed along with other per-client data. Since the orphaned root-level directory is outside this expected hierarchy, the cleanup routine fails to delete these files. Consequently, the underlying struct q54sj108a2_data structures remain allocated in memory even after the device has been logically detached or powered down. If a user subsequently accesses any of these dangling debugfs entries via read or write operations, they trigger access to freed memory regions, leading to undefined behavior, potential kernel panics, or arbitrary code execution depending on how the freed memory is reused by other subsystems.
This vulnerability aligns with CWE-476, which describes a NULL pointer dereference that can lead to unexpected termination or crash, and more critically CWE-416, Use After Free, due to the access of deallocated memory through stale pointers retained in orphaned debugfs files. In terms of attack vectors, this falls under ATT&CK technique T1059, Command and Scripting Interpreter, if an attacker can leverage the kernel panic or information disclosure for further exploitation, though it is primarily a stability issue exploitable locally by users with access to debugfs interfaces. The presence of CONFIG_DEBUG_FS typically implies development environments where such risks are higher due to elevated privileges required to interact with these files.
To mitigate this vulnerability and prevent similar issues in future kernel developments, strict validation of all pointer returns from allocation or lookup functions is mandatory before they are used as arguments for further system calls. In the context of debugfs interactions, developers must ensure that parent directories exist and are valid before attempting to create child entries. If a client-specific directory cannot be created, the driver should abort the probe process entirely rather than proceeding with partial initialization that leaves orphaned resources behind. Additionally, implementing robust cleanup routines that account for all allocated structures regardless of their filesystem location can provide defense-in-depth against resource leaks and use-after-free conditions. Ensuring that debugfs entries are tightly coupled to device lifecycle management through proper reference counting or explicit removal during unbind is essential for maintaining kernel integrity in systems with debugging features enabled.