media: zoran: Avoid freeing a registered video_device twice
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 82e3a496eb56da0b9f29fdc5b63cedb3289e91de · < f1c4f3885df1f09bcab5296d86834d104f865e86| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
media: zoran: Avoid freeing a registered video_device twice
zoran_init_video_device() installs zoran_vdev_release() as the video_device release callback through zoran_template. After video_register_device() succeeds, video_unregister_device() drops the registered video_device reference and the V4L2 core eventually invokes that release callback, which kfree()s the video_device.
zoran_exit_video_devices() called video_unregister_device() and then kfree(zr->video_dev), so device teardown could free the same video_device twice.
Remove the direct kfree() and clear the cached pointer after unregistering. The pre-registration failure path keeps its manual free because the video_device was not registered there.
This issue was found by a static analysis checker and confirmed by manual source review.
From the CVE record · Linux
The Linux kernel's zoran media driver can free a registered video device twice during device teardown. The input does not establish whether an attacker can trigger this behavior or specify access or user-interaction requirements.
Engineers running Linux kernels with the zoran media driver should check their deployments; affected versions were not provided.