gpio: zynq: fix runtime PM leak on request error path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3242ba117e9bd29eb748afd6f6fbfbd6dd7cfe52 · < 58a417a19d80141fff3abe6004e2e47285506e73| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
gpio: zynq: fix runtime PM leak on request error path
pm_runtime_get_sync() leaves the usage counter incremented even when it fails, and zynq_gpio_request() returns the error without dropping it.
gpiolib does not call ->free() when ->request() fails, so zynq_gpio_free(), which holds the only matching pm_runtime_put(), never runs. The reference is leaked and the controller can no longer runtime-suspend, so its clock stays enabled.
Switch to pm_runtime_resume_and_get(), which only increments the usage counter on success.
From the CVE record · Linux
If a Zynq GPIO request encounters a runtime PM error, the kernel leaks a usage reference. The controller can then no longer runtime-suspend, leaving its clock enabled. No attacker-controlled trigger or network, authentication, or user-interaction conditions are described.
Engineers running Linux systems that use the Zynq GPIO driver should check their kernel; affected versions are not specified.