drm/bridge: samsung-dsim: fix TE GPIO lifetime for host attach
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/bridge: samsung-dsim: fix TE GPIO lifetime for host attach
When the Exynos DSI driver was generalized into samsung-dsim, the TE GPIO acquisition was switched from gpiod_get_optional() to devm_gpiod_get_optional() while keeping the matching gpiod_put() calls. That combination is wrong for a managed descriptor.
However, dropping the puts and keeping the managed get is also wrong: samsung_dsim_register_te_irq() runs from the DSI host attach callback, and host detach/reattach can happen without destroying the device that owns the managed action. A second attach would then request the GPIO again without having released it.
Switch back to a non-managed gpiod_get_optional() and keep the explicit gpiod_put() on the request_irq() error path and in samsung_dsim_unregister_te_irq().
[Luca: remove unnecessary comment]
From the CVE record · Linux
The Linux kernel's samsung-dsim bridge driver mishandles the lifetime of its TE GPIO descriptor. A DSI host detach and reattach can cause the driver to request the GPIO again without releasing it first; the input does not describe an attacker path or authentication requirements.
Engineers running Linux kernels with the samsung-dsim bridge driver should check their versions; affected versions are not specified.