Description
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.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
6093d3002eabd7c2913d97f1d1f4ce34b072acf9 to < 331242998a7ade5c2f65e14988901614629f3db5affected6093d3002eabd7c2913d97f1d1f4ce34b072acf9 to < 2c685e99efb3b3bd2b78699fba6b1cf321975db0affected6093d3002eabd7c2913d97f1d1f4ce34b072acf9 to < 585fd9a2063dacce8b2820f675ef23d5d17434c5affected6093d3002eabd7c2913d97f1d1f4ce34b072acf9 to < 1a0d9083c24fbd5d22f7100f09d11e4d696a5f01affected6093d3002eabd7c2913d97f1d1f4ce34b072acf9 to < d8549a453d5bdc0a71de66ad47a1106703406a56affected6093d3002eabd7c2913d97f1d1f4ce34b072acf9 to < 72b9e81e0203f03c40f3adb457f55bd4c8eb112daffected6093d3002eabd7c2913d97f1d1f4ce34b072acf9 to < cf2023e84f0888f96f4b65dc0804e7f3651969c1affected6093d3002eabd7c2913d97f1d1f4ce34b072acf9 to < bef4f4a88b73e4cc550d25f665b8a9952af22773affected
Linux Linux
Default version status: affected
4.20affected0 to < 4.20unaffected5.10.253 to ≤ 5.10.*unaffected5.15.203 to ≤ 5.15.*unaffected6.1.168 to ≤ 6.1.*unaffected6.6.131 to ≤ 6.6.*unaffected6.12.80 to ≤ 6.12.*unaffected6.18.21 to ≤ 6.18.*unaffected6.19.11 to ≤ 6.19.*unaffected7.0 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/331242998a7ade5c2f65e14988901614629f3db5 ↗
- https://git.kernel.org/stable/c/2c685e99efb3b3bd2b78699fba6b1cf321975db0 ↗
- https://git.kernel.org/stable/c/585fd9a2063dacce8b2820f675ef23d5d17434c5 ↗
- https://git.kernel.org/stable/c/1a0d9083c24fbd5d22f7100f09d11e4d696a5f01 ↗
- https://git.kernel.org/stable/c/d8549a453d5bdc0a71de66ad47a1106703406a56 ↗
- https://git.kernel.org/stable/c/72b9e81e0203f03c40f3adb457f55bd4c8eb112d ↗
- https://git.kernel.org/stable/c/cf2023e84f0888f96f4b65dc0804e7f3651969c1 ↗
- https://git.kernel.org/stable/c/bef4f4a88b73e4cc550d25f665b8a9952af22773 ↗