In the Linux kernel, the following vulnerability has been resolved:
drm: bridge/panel: Cleanup connector on bridge detach
If we don't call drmconnectorcleanup() manually in panelbridgedetach(), the connector will be cleaned up with the other DRM objects in the call to drmmodeconfigcleanup(). However, since our drmconnector is devm-allocated, by the time drmmodeconfig_cleanup() will be called, our connector will be long gone. Therefore, the connector must be cleaned up when the bridge is detached to avoid use-after-free conditions.
v2: Cleanup connector only if it was created
v3: Add FIXME
v4: (Use connector->dev) directly in if() block