power: supply: cpcap-charger: Fix null check for power_supply_get_by_name
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ eab4e6d953c1059a30ac0f15826abc7dd2374d3c · < 27001e4f146624c4b3389b029bdc0f8049819560| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
power: supply: cpcap-charger: Fix null check for power_supply_get_by_name
In the cpcap_usb_detect() function, the power_supply_get_by_name() function may return `NULL` instead of an error pointer. To prevent potential null pointer dereferences, Added a null check.
From the CVE record · Linux
In the Linux kernel’s cpcap-charger driver, cpcap_usb_detect() may dereference a null pointer if power_supply_get_by_name() returns NULL. The input does not establish how an attacker could trigger this condition or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with the cpcap-charger driver should check whether their versions are affected; affected versions are not specified.