staging: most: video: avoid double free on video register failure
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 80ed79787da3311f76b4d71d0ce7ab992a9e134d, Kernel 009d58b73500d0b49f6ae3833f8afcb0ebd9ddbb, Kernel 43078449ad6236d839e4d707954d2e36b10a6706 and 12 more.
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.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=eab231c0398a91fbd294672bfe9e0ff45b368246 <80ed79787da3311f76b4d71d0ce7ab992a9e134d, >=eab231c0398a91fbd294672bfe9e0ff45b368246 <009d58b73500d0b49f6ae3833f8afcb0ebd9ddbb, >=eab231c0398a91fbd294672bfe9e0ff45b368246 <43078449ad6236d839e4d707954d2e36b10a6706, >=eab231c0398a91fbd294672bfe9e0ff45b368246 <430ad4ea06a0767fb44a08e2212ceb3a996607ee, >=eab231c0398a91fbd294672bfe9e0ff45b368246 <46ea51f5b2ee1a3b40c05b7c750cbc5cabe94062, >=eab231c0398a91fbd294672bfe9e0ff45b368246 <4928096212b78262dbbeab3b3abf2352278ce22d, >=eab231c0398a91fbd294672bfe9e0ff45b368246 <7cb1c5b32a2bfde961fff8d5204526b609bcb30a, >=eab231c0398a91fbd294672bfe9e0ff45b368246 <7fc162453cfb7b8e93edb16287a84ba0130cac38, =4.9 | 80ed79787da3311f76b4d71d0ce7ab992a9e134d, 009d58b73500d0b49f6ae3833f8afcb0ebd9ddbb, 43078449ad6236d839e4d707954d2e36b10a6706, 430ad4ea06a0767fb44a08e2212ceb3a996607ee, 46ea51f5b2ee1a3b40c05b7c750cbc5cabe94062, 4928096212b78262dbbeab3b3abf2352278ce22d, 7cb1c5b32a2bfde961fff8d5204526b609bcb30a, 7fc162453cfb7b8e93edb16287a84ba0130cac38 |
| linux-kernel: Kernel | >=5.11.0 <5.15.212, >=5.16.0 <6.1.178, >=6.13.0 <6.18.40, >=6.19.0 <7.1.5, >=6.2.0 <6.6.145, >=6.7.0 <6.12.97, >=4.9.0 <5.10.261 | 5.15.212, 6.1.178, 6.18.40, 7.1.5, 6.6.145, 6.12.97, 5.10.261 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket