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.
CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 7.8
AV:L - The double-free is in zoran_exit_video_devices() on the ZR36057/36067 PCI MJPEG capture driver's zoran_remove() path (rmmod zr36067, PCI sysfs unbind, or hot-remove). It is reached from local driver teardown, not from network packets or a remote protocol.
AC:L - After a successful probe, zoran_remove() always calls video_unregister_device() then kfree(zr->video_dev). With no open fds, v4l2_device_release() already kfree's via zoran_vdev_release, so the second kfree is a deterministic double-free. With an fd held, the extra kfree is a deterministic UAF. No attacker-uncontrollable race or layout is required.
PR:L - v4l2_open() has no capable() check; udev typically grants /dev/video* to the video group or seated uaccess user on capture/surveillance hosts (e.g. AverMedia 6 Eyes). Per CNA driver-removal UAF precedent, an unprivileged local user can hold the node and spray the freed video_device while teardown proceeds; init-namespace root is not required.
UI:N - No victim action such as mounting a filesystem is required; the attacker opens /dev/video themselves and coordinates with driver removal (unbind/rmmod/maintenance). CNA driver-removal UAFs score UI:N.
S:U - The double-free/UAF corrupts the host kernel slab object struct video_device. Any privilege escalation remains in the same kernel; this is not a VM/IOMMU boundary bypass.
C:H - Double-free/UAF of struct video_device lets an attacker reclaim the slab object and read leftover kernel pointers/object state via subsequent ioctl/mmap on a still-open /dev/video fd, so confidentiality is High.
I:H - struct video_device embeds fops, ioctl_ops, and a release callback; reclaiming the freed object enables function-pointer overwrite and control-flow hijacking, so integrity is High.
A:H - A kernel double-free of video_device causes an oops/panic on the second kfree or on use of the dangling device, so availability is High.
| Attack Vector |
Local |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
Low |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:L - The double-free is in zoran_exit_video_devices() on the ZR36057/36067 PCI MJPEG capture driver's zoran_remove() path (rmmod zr36067, PCI sysfs unbind, or hot-remove). It is reached from local driver teardown, not from network packets or a remote protocol.
AC:L - After a successful probe, zoran_remove() always calls video_unregister_device() then kfree(zr->video_dev). With no open fds, v4l2_device_release() already kfree's via zoran_vdev_release, so the second kfree is a deterministic double-free. With an fd held, the extra kfree is a deterministic UAF. No attacker-uncontrollable race or layout is required.
PR:L - v4l2_open() has no capable() check; udev typically grants /dev/video* to the video group or seated uaccess user on capture/surveillance hosts (e.g. AverMedia 6 Eyes). Per CNA driver-removal UAF precedent, an unprivileged local user can hold the node and spray the freed video_device while teardown proceeds; init-namespace root is not required.
UI:N - No victim action such as mounting a filesystem is required; the attacker opens /dev/video themselves and coordinates with driver removal (unbind/rmmod/maintenance). CNA driver-removal UAFs score UI:N.
S:U - The double-free/UAF corrupts the host kernel slab object struct video_device. Any privilege escalation remains in the same kernel; this is not a VM/IOMMU boundary bypass.
C:H - Double-free/UAF of struct video_device lets an attacker reclaim the slab object and read leftover kernel pointers/object state via subsequent ioctl/mmap on a still-open /dev/video fd, so confidentiality is High.
I:H - struct video_device embeds fops, ioctl_ops, and a release callback; reclaiming the freed object enables function-pointer overwrite and control-flow hijacking, so integrity is High.
A:H - A kernel double-free of video_device causes an oops/panic on the second kfree or on use of the dangling device, so availability is High.
CVSS 3.1