В ядре Linux устранена следующая уязвимость:
постановка: большинство: видео: избегать двойного освобождения при сбое регистрации видео
comp_register_videodev() выделяет video_device с
video_device_alloc() и освобождает его, если video_register_device() завершается сбоем. Это может дважды освободить video_device, когда __video_register_device()
достигает device_register(), и этот вызов завершается неудачно:
video_register_device()
-> __video_register_device()
-> device_register() не работает
-> put_device(&vdev->dev)
-> v4l2_device_release()
-> vdev-> выпуск (vdev)
-> video_device_release(vdev)
comp_register_videodev()
-> video_device_release(mdev->vdev)
Используйте video_device_release_empty() при регистрации устройства, чтобы
Пути неудачной регистрации не освобождают mdev->vdev через vdev->release().
comp_register_videodev() затем освобождает mdev->vdev ровно один раз в случае сбоя. Восстановите video_device_release() после успешной регистрации, чтобы
зарегистрированное устройство сохраняет нормальное обращение в течение всего срока службы.
Эта проблема была обнаружена инструментом статического анализа, который я разрабатываю.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: staging: most: video: avoid double free on video register failure comp_register_videodev() allocates a video_device with video_device_alloc() and releases it if video_register_device() fails. This can double free the video_device when __video_register_device() reaches device_register() and that call fails: video_register_device() -> __video_register_device() -> device_register() fails -> put_device(&vdev->dev) -> v4l2_device_release() -> vdev->release(vdev) -> video_device_release(vdev) comp_register_videodev() -> video_device_release(mdev->vdev) Use video_device_release_empty() while registering the device so that registration failure paths do not free mdev->vdev through vdev->release(). comp_register_videodev() then releases mdev->vdev exactly once on failure. Restore video_device_release() after successful registration so the registered device keeps its normal lifetime handling. This issue was found by a static analysis tool I am developing.
Уязвимые продукты 8
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.9
|
5.10.261
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.9
|
5.15.212
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.9
|
6.1.178
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.9
|
6.6.145
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.9
|
6.12.97
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.9
|
6.18.40
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.9
|
7.1.5
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.9
|
7.2-rc1
|