media: mc, v4l2: serialize REINIT and REQBUFS with req_queue_mutex
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6093d3002eabd7c2913d97f1d1f4ce34b072acf9 · < 72b9e81e0203f03c40f3adb457f55bd4c8eb112d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
media: mc, v4l2: serialize REINIT and REQBUFS with req_queue_mutex
MEDIA_REQUEST_IOC_REINIT can run concurrently with VIDIOC_REQBUFS(0) queue teardown paths. This can race request object cleanup against vb2 queue cancellation and lead to use-after-free reports.
We already serialize request queueing against STREAMON/OFF with req_queue_mutex. Extend that serialization to REQBUFS, and also take the same mutex in media_request_ioctl_reinit() so REINIT is in the same exclusion domain.
This keeps request cleanup and queue cancellation from running in parallel for request-capable devices.
From the CVE record · Linux
In the Linux kernel, MEDIA_REQUEST_IOC_REINIT can race with VIDIOC_REQBUFS(0) queue teardown on request-capable media devices, causing a use-after-free. A local user with access to such a device could trigger the race; authentication requirements and user interaction are not specified.
Engineers running Linux kernels on systems with request-capable media devices should check their kernel versions against the vendor advisory; affected versions are not specified.