CVE-2026-142857: leds: ktd2692: Pass context to regulator cleanup
In the Linux kernel, the following vulnerability has been resolved:
leds: ktd2692: Pass context to regulator cleanup
regulatordisableaction() retrieves the driver context from device driver data. However, ktd2692parsedt() registers the action before ktd2692probe() stores the context with platformsetdrvdata().
If devmaddactionorreset() cannot allocate the action, it invokes the callback immediately. A later probe failure also invokes it during managed-resource unwinding. Both paths dereference a NULL context.
Pass the already allocated context directly to the action and retain the device pointer in it for error reporting. The context is allocated before the action is registered, so reverse-order devres unwinding keeps it alive through the callback.
This issue was identified during our ongoing static-analysis research while reviewing kernel code.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Pass the already allocated context directly to the regulator cleanup action and retain the device pointer in the context for error reporting.