HIGH
media/dvb Waitqueue UAF
CVE-2026-23253
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.8HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: media: dvb-core: fix wrong reinitialization of ringbuffer on reopen dvb_dvr_open() calls dvb_ringbuffer_init() when a new reader opens the DVR device. dvb_ringbuffer_init() calls init_waitqueue_head(), which reinitializes the waitqueue list head to empty. Since dmxdev->dvr_buffer.queue is a shared waitqueue (all opens of the same DVR device share it), this orphans any existing waitqueue entries from io_uring poll or epoll, leaving them with stale prev/next pointers while the list head is reset to {self, self}. The waitqueue and spinlock in dvr_buffer are already properly initialized once in dvb_dmxdev_init(). The open path only needs to reset the buffer data pointer, size, and read/write positions. Replace the dvb_ringbuffer_init() call in dvb_dvr_open() with direct assignment of data/size and a call to dvb_ringbuffer_reset(), which properly resets pread, pwrite, and error with correct memory ordering without touching the waitqueue or spinlock.
02KernelScan AI Analysis
Risk summary
Local attackers with access to DVB devices can trigger use-after-free conditions in waitqueue entries when multiple processes open the same DVR device. This can lead to kernel memory corruption, privilege escalation, or system crashes on systems with DVB hardware or virtual DVB devices.
Vulnerability analysis
The root cause is improper reinitialization of a shared waitqueue in dvb_dvr_open(). When dvb_ringbuffer_init() is called on device reopen, it calls init_waitqueue_head() which resets the waitqueue list head to empty, orphaning existing waitqueue entries from io_uring poll or epoll operations. These orphaned entries retain stale prev/next pointers while the list head is reset, creating a use-after-free condition when the waitqueue is later accessed. The fix replaces the full reinitialization with selective reset of only the buffer data and positions, preserving the properly initialized waitqueue and spinlock structures.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 5.10 | 5.10.253 | 527cfa8a3486 |
| 5.15 | 5.15.203 | fb378cf89be4 |
| 6.1 | 6.1.167 | f1e520ca2e83 |
| 6.12 | 6.12.77 | d71781bad59b |
| 6.18 | 6.18.17 | cfd94642025e |
| 6.19 | 6.19.7 | 32eb8e4adc20 |
| 6.6 | 6.6.130 | af050ab44fa1 |
| mainline | 7.0 | bfbc0b5b32a8 |