ACPI: battery: Fix possible crash when unregistering a battery hook
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ fa93854f7a7ed63d054405bf3779247d5300edd3 · < ce31847f109c3a5b2abdd19d7bcaafaacfde53de| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ACPI: battery: Fix possible crash when unregistering a battery hook
When a battery hook returns an error when adding a new battery, then the battery hook is automatically unregistered. However the battery hook provider cannot know that, so it will later call battery_hook_unregister() on the already unregistered battery hook, resulting in a crash.
Fix this by using the list head to mark already unregistered battery hooks as already being unregistered so that they can be ignored by battery_hook_unregister().
From the CVE record · Linux
The Linux kernel can crash when a battery hook fails while adding a new battery and its provider later tries to unregister the already-unregistered hook. The input does not establish whether an attacker can trigger this condition or whether network access, authentication, or user interaction is required.
Engineers running the Linux kernel should check their systems; affected versions are not specified.