media: davinci: vpif: fix use-after-free on driver unbind
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:
media: davinci: vpif: fix use-after-free on driver unbind
The driver allocates and registers two platform device structures during probe, but the devices were never deregistered on driver unbind.
This results in a use-after-free on driver unbind as the device structures were allocated using devres and would be freed by driver core when remove() returns.
Fix this by adding the missing deregistration calls to the remove() callback and failing probe on registration errors.
Note that the platform device structures must be freed using a proper release callback to avoid leaking associated resources like device names.
From the CVE record · Linux
The Linux kernel's davinci VPIF driver fails to deregister two platform devices during driver unbind. When the driver is unbound, the device structures can be freed while still registered, causing a use-after-free. The input does not specify whether an attacker can trigger unbind or what access that would require.
Engineers running Linux kernels with the davinci VPIF driver should check their versions; affected versions are not specified.