PT-2026-161506
Published
2026-11-19
·
Updated
2026-11-19
Description by
Score
N/A
Not availableNo severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
In the Linux kernel, the following vulnerability has been resolved:
media: cx23885: Fix use-after-free in cx23885 finidev due to race condition
In cx23885 v4l2 dev notify init, &dev->cx25840 work is bound with
cx23885 av work handler, and &dev->ir rx work and &dev->ir tx work
are bound with cx23885 ir rx work handler and
cx23885 ir tx work handler. cx23885 irq can schedule these works on
system wq when an AV CORE interrupt is received, and the IR subdevice
can also schedule the IR works from its interrupt service routine via
the v4l2 device notify callback.
If we remove the device, cx23885 finidev makes cleanup and the memory
allocated for dev is released by kfree(dev), while the works mentioned
above may still be pending or running. The sequence of operations that
may lead to a UAF bug is as follows:
CPU0 CPU1
| cx23885 irq
| schedule work(&dev->cx25840 work)cx23885 finidev |
cx23885 input fini(dev) |
cx23885 ir fini(dev) |
cx23885 shutdown(dev) |
free irq(pci dev->irq, dev) |
pci disable device(pci dev) |
cx23885 dev unregister(dev) |
v4l2 device unregister(v4l2 dev) |
kfree(dev) |
// dev is freed |
| cx23885 av work handler
| // use dev (use-after-free)
Fix it by canceling the works after the IRQ handler that can schedule
them has been stopped, and before proceeding with the remaining
cleanup in cx23885 finidev.
Note that the flush work() calls in cx23885 input ir stop() do not
close this race: they only wait for works that are already queued or
running at that moment, they do not prevent the IRQ handler, which is
still registered at that point, from scheduling the works again
afterwards, and they are skipped entirely when dev->sd ir is NULL.
The cancel work sync() calls are therefore placed after free irq(),
the only point at which no new work can be scheduled.
Vendors
Affected products
Related identifiers
Found an issue in the description? Have something to add? Feel free to write us 👾