Skip to contentSkip to conversation

CVE-2026-89870: media: zoran: Avoid freeing a registered video_device twice

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 16

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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.

The Linux kernel CVE team has assigned CVE-2026-89870 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.18 with commit 82e3a496eb56da0b9f29fdc5b63cedb3289e91de and fixed in 6.1.188 with commit 3ad6cf27505017a6794f5f96c31218c2291e951b
	Issue introduced in 5.18 with commit 82e3a496eb56da0b9f29fdc5b63cedb3289e91de and fixed in 6.6.157 with commit c4acac8cdc005b2d14b6cef5e215d264212857f3
	Issue introduced in 5.18 with commit 82e3a496eb56da0b9f29fdc5b63cedb3289e91de and fixed in 6.12.110 with commit 4d99d8d0d895489064783601a516bd45812fa992
	Issue introduced in 5.18 with commit 82e3a496eb56da0b9f29fdc5b63cedb3289e91de and fixed in 6.18.51 with commit f1c4f3885df1f09bcab5296d86834d104f865e86
	Issue introduced in 5.18 with commit 82e3a496eb56da0b9f29fdc5b63cedb3289e91de and fixed in 7.2.5 with commit 672dbccf4351370dad002d3c78dbb29ca1588f22
	Issue introduced in 5.18 with commit 82e3a496eb56da0b9f29fdc5b63cedb3289e91de and fixed in 7.3-rc1 with commit 0735e0b5a96761a9ce277a238e834008ad92a0a5
	Issue introduced in 5.10.110 with commit bd01629315ffd5b63da91d0bd529a77d30e55028
	Issue introduced in 5.15.33 with commit ff3357bffd9fb78f59762d8955afc7382a279079
	Issue introduced in 5.16.19 with commit c1ba65100a359fe28cfe37e09e10c99f247cbf1e
	Issue introduced in 5.17.2 with commit 1e501ec38796f43e995731d1bcd4173cb1ccfce0

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-89870

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/media/pci/zoran/zoran_card.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/3ad6cf27505017a6794f5f96c31218c2291e951b
	https://git.kernel.org/stable/c/c4acac8cdc005b2d14b6cef5e215d264212857f3
	https://git.kernel.org/stable/c/4d99d8d0d895489064783601a516bd45812fa992
	https://git.kernel.org/stable/c/f1c4f3885df1f09bcab5296d86834d104f865e86
	https://git.kernel.org/stable/c/672dbccf4351370dad002d3c78dbb29ca1588f22
	https://git.kernel.org/stable/c/0735e0b5a96761a9ce277a238e834008ad92a0a5