CVE-2026-138928

media: tw686x: fix V4L2 device lifetime on probe failure

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

media: tw686x: fix V4L2 device lifetime on probe failure

tw686x_video_init() registers the V4L2 device, which initializes its
reference count. Successfully registered video devices take additional
references to the V4L2 device as well.

The probe failure paths currently tear down the PCI resources and then
free the channel arrays and the tw686x device directly. This bypasses
the V4L2 device reference count and the tw686x_dev_release() callback.

If a video device still holds a reference, its eventual release will
drop a reference to the already freed V4L2 device. Even when no extra
references remain, directly freeing the device bypasses the lifetime
management established by v4l2_device_register().

After cleaning up the PCI resources, check whether the V4L2 device was
registered. If so, mark the hardware unavailable and drop the driver's
V4L2 device reference, letting tw686x_dev_release() free the backing
objects when the final reference is released. Keep the existing direct
free path for failures that occur before V4L2 device registration.

This issue was found by manual code inspection.

Analysis

AI-generated

Technical impact

The bug in the tw686x media driver occurs when the probe process fails after the V4L2 device has been registered but before the hardware is fully initialized. The failure path frees the tw686x device directly, bypassing the V4L2 reference counting mechanism. If a video instance still holds a reference, its later release will decrement a reference on an already freed device, which can trigger a double free or corrupt kernel memory. The resulting memory corruption could lead to a kernel panic or provide an attacker with a vector for privilege escalation or arbitrary code execution.

Affected Systems

This issue affects the Linux kernel's tw686x device driver. All distributions that ship the current tw686x driver without the patch are impacted. Exact kernel version ranges are not specified in the advisory, so any kernel version containing the unpatched driver should be considered at risk.

Risk and Exploitability

The vulnerability does not have an associated CVSS score in the public data, and the EPSS score is not available. It is not listed in CISA's KEV catalog, suggesting no known widespread exploitation. The bug is local and requires a probe failure on the tw686x hardware, which an attacker could trigger by manipulating the device or by causing a faulty hardware connection. While the exact exploitation probability is unclear, the potential impact of a double free in kernel space warrants careful attention and consideration of mitigation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest kernel patch that contains the fix for the tw686x driver.
  • If patching is not immediately possible, prevent the driver from loading by adding it to a blacklist (e.g., modprobe.blacklist=tw686x or removing the module).
  • Ensure that any tw686x hardware is powered off or removed from systems that cannot be patched until the driver can be safely updated.

Generated by OpenCVE AI on November 30, 2026 at 18:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-415
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: media: tw686x: fix V4L2 device lifetime on probe failure tw686x_video_init() registers the V4L2 device, which initializes its reference count. Successfully registered video devices take additional references to the V4L2 device as well. The probe failure paths currently tear down the PCI resources and then free the channel arrays and the tw686x device directly. This bypasses the V4L2 device reference count and the tw686x_dev_release() callback. If a video device still holds a reference, its eventual release will drop a reference to the already freed V4L2 device. Even when no extra references remain, directly freeing the device bypasses the lifetime management established by v4l2_device_register(). After cleaning up the PCI resources, check whether the V4L2 device was registered. If so, mark the hardware unavailable and drop the driver's V4L2 device reference, letting tw686x_dev_release() free the backing objects when the final reference is released. Keep the existing direct free path for failures that occur before V4L2 device registration. This issue was found by manual code inspection.
Title media: tw686x: fix V4L2 device lifetime on probe failure
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:26 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:17 PM
Modified
Nov 30, 2026, 2:17 PM