CVE-2026-64029

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
19/07/2026
Last modified:
30/07/2026

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> ALSA: seq: Serialize UMP output teardown with event_input<br /> <br /> seq_ump_process_event() borrows client-&gt;out_rfile.output without<br /> synchronizing with the first-open and last-close transition in<br /> seq_ump_client_open() and seq_ump_client_close().<br /> <br /> The last output unuse can therefore drop opened[STR_OUT] to zero and<br /> release the rawmidi file while an in-flight event_input callback is still<br /> inside snd_rawmidi_kernel_write(). That leaves the rawmidi substream<br /> runtime exposed to teardown before the write path has taken its own<br /> buffer reference.<br /> <br /> Add a per-client rwlock for the event_input-visible output file. Publish<br /> a newly opened output file under the write side, and hold the read side<br /> from the output lookup through snd_rawmidi_kernel_write(). The last<br /> output close copies and clears the visible output file under the write<br /> side, then drops the lock and releases the saved rawmidi file. Use<br /> IRQ-safe rwlock guards because event_input can also be reached from<br /> atomic sequencer delivery.<br /> <br /> The buggy scenario involves two paths, with each column showing the<br /> order within that path:<br /> <br /> path A label: event_input path path B label: last unuse path<br /> 1. seq_ump_process_event() reads 1. seq_ump_client_close()<br /> client-&gt;out_rfile.output. drops opened[STR_OUT] to zero.<br /> 2. snd_rawmidi_kernel_write1() 2. snd_rawmidi_kernel_release()<br /> has not yet pinned runtime. closes the output file.<br /> 3. The writer continues using 3. close_substream() frees<br /> the borrowed substream. substream-&gt;runtime.<br /> <br /> This keeps the output substream and runtime alive for the full<br /> event_input write while keeping rawmidi release outside the rwlock.<br /> <br /> KASAN reproduced this as a slab-use-after-free in<br /> snd_rawmidi_kernel_write1(), with allocation through<br /> seq_ump_use()/snd_seq_port_connect() and free through<br /> seq_ump_unuse()/snd_seq_port_disconnect().<br /> <br /> <br /> Validation reproduced this kernel report:<br /> KASAN slab-use-after-free in snd_rawmidi_kernel_write1+0x9d/0x400<br /> RIP: 0033:0x7f5528af837f<br /> Read of size 8<br /> Call trace:<br /> dump_stack_lvl+0x73/0xb0 (?:?)<br /> print_report+0xd1/0x650 (?:?)<br /> srso_alias_return_thunk+0x5/0xfbef5 (?:?)<br /> __virt_addr_valid+0x1a7/0x340 (?:?)<br /> kasan_complete_mode_report_info+0x64/0x200 (?:?)<br /> kasan_report+0xf7/0x130 (?:?)<br /> snd_rawmidi_kernel_write1+0x9d/0x400 (?:?)<br /> __asan_load8+0x82/0xb0 (?:?)<br /> update_stack_state+0x1ef/0x2d0 (?:?)<br /> snd_rawmidi_kernel_write+0x1a/0x20 (?:?)<br /> seq_ump_process_event+0xd4/0x120 (sound/core/seq/seq_ump_client.c:82)<br /> __snd_seq_deliver_single_event+0x8a/0xe0 (?:?)<br /> snd_seq_deliver_from_ump+0x2b2/0xd60 (?:?)<br /> lock_acquire+0x14e/0x2e0 (?:?)<br /> find_held_lock+0x31/0x90 (?:?)<br /> snd_seq_port_use_ptr+0xa6/0xe0 (?:?)<br /> __kasan_check_write+0x18/0x20 (?:?)<br /> do_raw_read_unlock+0x32/0xa0 (?:?)<br /> _raw_read_unlock+0x26/0x50 (?:?)<br /> snd_seq_deliver_single_event+0x45c/0x4b0 (?:?)<br /> snd_seq_deliver_event+0x10d/0x1b0 (?:?)<br /> snd_seq_client_enqueue_event+0x192/0x240 (?:?)<br /> snd_seq_write+0x2cd/0x450 (?:?)<br /> apparmor_file_permission+0x20/0x30 (?:?)<br /> security_file_permission+0x51/0x60 (?:?)<br /> vfs_write+0x1ce/0x850 (?:?)<br /> __fget_files+0x12b/0x220 (?:?)<br /> lock_release+0xc8/0x2a0 (?:?)<br /> __rcu_read_unlock+0x74/0x2d0 (?:?)<br /> __fget_files+0x135/0x220 (?:?)<br /> ksys_write+0x15a/0x180 (?:?)<br /> rcu_is_watching+0x24/0x60 (?:?)<br /> __x64_sys_write+0x46/0x60 (?:?)<br /> x64_sys_call+0x7d/0x20d0 (?:?)<br /> do_syscall_64+0xc1/0x360 (arch/x86/entry/syscall_64.c:87)<br /> entry_SYSCALL_64_after_hwframe+0x77/0x7f (?:?)