PCI/pwrctrl: Fix double cleanup on devm_add_action_or_reset() failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
PCI/pwrctrl: Fix double cleanup on devm_add_action_or_reset() failure
When devm_add_action_or_reset() fails, it calls the passed cleanup function. Hence the caller must not repeat that cleanup.
Replace the "goto err_regulator_free" by the actual freeing, as there will never be a need again for a second user of this label.
From the CVE record · Linux
The Linux kernel’s PCI/pwrctrl code can repeat a cleanup when devm_add_action_or_reset() fails, even though that function already performs the cleanup. The input does not describe how an attacker could trigger the failure or whether access or user interaction is required.
Engineers running the Linux kernel should check affected versions against the vendor advisory; no version range is provided.