CVE-2026-143457: pwm: lp3943: fix NULL pointer dereference for an unconfigured channel
In the Linux kernel, the following vulnerability has been resolved:
pwm: lp3943: fix NULL pointer dereference for an unconfigured channel
lp3943pwmprobe() unconditionally registers a pwmchip with LP3943NUMPWMS(2) hwpwm channels, but lp3943pwmparsedt() only populates pdata->pwms[i] for the channels whose ti,pwm0/ti,pwm1 property is actually present in the devicetree (the binding explicitly allows each PWM generator to drive zero or more outputs, and lp3943pwmparsedt() only fails outright with -ENODATA if neither property is present). A devicetree that configures only one of the two channels leaves pdata->pwms[] NULL for the other.
lp3943pwmrequestmap() dereferences pdata->pwms[hwpwm] with no NULL check:
pwmmap->output = pdata->pwms[hwpwm]->output; pwmmap->numoutputs = pdata->pwms[hwpwm]->numoutputs;
so requesting the unconfigured channel (e.g. exporting it from sysfs) crashes with a NULL pointer dereference instead of failing cleanly.
Return -ENODEV from lp3943pwmrequestmap() when the channel was never configured, before the pointer is dereferenced. The caller, lp3943pwmrequest(), already propagates an ERRPTR return correctly (it does so today for the existing -EBUSY case).
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In lp3943_pwm_request_map(), return -ENODEV when the requested channel is unconfigured, before dereferencing pdata->pwms[hwpwm].
Event History
Frequently Asked Questions
Which systems are exposed to the crash?
Systems using the LP3943 PWM driver are exposed when their device tree configures only one of the two PWM channels. The other channel remains registered but has no mapping data, so a request for that unconfigured channel can dereference a NULL pointer.
What must happen to trigger the issue?
A local requester must attempt to use the LP3943 PWM channel that was not configured in the device tree. One stated example is exporting the unconfigured channel through sysfs.
Are default or fully configured deployments affected?
The described condition requires a device tree that configures exactly one of the two channels. A device tree with neither PWM property fails parsing, while the issue specifically arises when one channel is configured and the other is left unconfigured.
What does the fix change if the unconfigured channel is requested?
The driver now returns -ENODEV before dereferencing the absent channel mapping. The existing request path propagates that error, causing the request to fail cleanly rather than crash.