CVE-2026-74261 in Linux
摘要
由 VulDB • 2026-08-15
在 Linux 内核中,已修复以下漏洞:
ALSA: seq: 避免调整大小时出现过期的 FIFO 单元
snd_seq_fifo_resize() 需要在等待 FIFO 用户之前发布替换池。阻塞式的 snd_seq_read() 会在睡眠期间持有 f->use_lock,因此并发发送者必须能够向新队列排队并唤醒该读取器,而不是因旧队列正在关闭而失败。
然而,snd_seq_fifo_event_in() 在获取 f->lock 之前会复制事件,如果 copy_to_user() 或 snd_seq_expand_var_event() 失败,snd_seq_read() 可能会出队一个单元并在稍后调用 snd_seq_fifo_cell_putback()。如果在两者之间 resize 交换了 f->pool 并分离了 oldhead,任一路径都可能在快照之后重新链接旧池中的单元。该过期单元位于已排空的 oldhead 列表之外,保持 oldpool->counter 处于高位状态,可能导致 snd_seq_pool_delete() 等待退休的池排空。
保留 snd_seq_fifo_resize() 中现有的“先交换后等待”顺序,但在任何 FIFO 重新链接之前拒绝过期单元。在 f->lock 下重新验证 event-in 单元并针对已发布的替换队列重试它们,释放过期的 putback 单元而不是将它们重新链接回 FIFO。
有缺陷的场景涉及两条路径,每列显示该路径内的顺序:
resize path: relink path: 1. Allocate newpool. 1. Take f->use_lock. 2. Swap f->pool to newpool and 2. Duplicate or dequeue an old-pool detach oldhead. cell before oldpool closes. 3. Mark oldpool closing and 3. Reach a later relink point after wait for FIFO users. resize published newpool. 4. Free oldhead and delete 4. Relink the old-pool cell after oldpool. resize detached oldhead. 5. Drop f->use_lock.
重现程序报告调整大小 ioctl 在预期的池拆卸路径中阻塞:
signal: resize iteration=98 target_pool=4 exceeded 250ms (elapsed=251ms) diagnostic: resize_tid=651 wchan=snd_seq_pool_done diagnostic: resize_tid=651 stack= snd_seq_pool_done+0x5b/0x140 snd_seq_pool_delete+0x7a/0x90 snd_seq_fifo_resize+0x193/0x1e0 snd_seq_ioctl_set_client_pool+0x214/0x260 snd_seq_ioctl+0x119/0x540 __x64_sys_ioctl+0xd1/0x120 do_syscall_64+0xbb/0x2f0 entry_SYSCALL_64_after_hwframe+0x77/0x7f
第二次运行使用更大的池时遇到了相同的目标路径:
signal: resize iteration=32 target_pool=64 exceeded 250ms (elapsed=251ms) diagnostic: resize_tid=663 wchan=snd_seq_pool_done diagnostic: resize_tid=663 stack= snd_seq_pool_done+0x5b/0x140 snd_seq_pool_delete+0x7a/0x90 snd_seq_fifo_resize+0x193/0x1e0 snd_seq_ioctl_set_client_pool+0x214/0x260 snd_seq_ioctl+0x119/0x540 __x64_sys_ioctl+0xd1/0x120 do_syscall_64+0xbb/0x2f0 entry_SYSCALL_64_after_hwframe+0x77/0x7f
VulDB is the best source for vulnerability data and more expert information about this specific topic.