PT-2026-163462
CVE-2026-139421
·
Published
2026-11-30
·
Updated
2026-11-30
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:
ALSA: jack: Remove debugfs before freeing unregistered jacks
Jack debugfs files store a raw snd jack kctl pointer, so their
callbacks must be drained before the attachment is freed.
snd jack dev free() unlinks and frees the attachments before calling
snd jack dev disconnect(). Its late snd jack remove debugfs() call
then has no entries left to traverse.
With CONFIG SND JACK INJECTION DEBUG and input support enabled, an
HDA codec rebind on a live card can publish a non-phantom jack's type
file while its component is still in SNDRV DEV BUILD. A later
jack-control allocation failure permits the following order:
- hda codec driver probe() creates a jack and publishes its debugfs files before reaching snd card register().
- A later control-build failure calls snd hda codec cleanup for unbind(), then snd hda jack tbl clear() and snd device free(). snd device disconnect() skips BUILD components. snd jack dev free() frees the attachment before its late disconnect, leaving the debugfs files published.
- After cleanup, a reader opens the surviving type file and jack type read() dereferences the freed attachment's jack pointer.
The card's debugfs root remains live throughout this sequence. The
result is a use-after-free even without an overlapping read. An
already admitted callback is also not drained by this cleanup.
Call snd jack remove debugfs() before unlinking any controls in the
free callback. The existing debugfs remove() rundown blocks new
accesses and waits for active callbacks while the attachment, control
and jack remain valid. Roots cleared by an earlier disconnect are
NULL, so repeating the removal is harmless.
KASAN report as below:
==================================================================
BUG: KASAN: slab-use-after-free in jack type read+0x1da/0x1f0
Read of size 8 at addr ffff8881085f9da0 by task python3/429
CPU: 2 UID: 0 PID: 429 Comm: python3 Not tainted 7.2.0-rc6-pmb-alsa-functional-v2+ #1 PREEMPT(lazy)
Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
dump stack lvl+0x93/0xd0
print report+0xce/0x630
? jack type read+0x1da/0x1f0
? srso alias return thunk+0x5/0xfbef5
? virt addr valid+0x20d/0x410
? jack type read+0x1da/0x1f0
kasan report+0xe0/0x110
? jack type read+0x1da/0x1f0
jack type read+0x1da/0x1f0
? pfx jack type read+0x10/0x10
? pfx debugfs file get+0x10/0x10
? pfx cp new stat+0x10/0x10
? srso alias return thunk+0x5/0xfbef5
? srso alias return thunk+0x5/0xfbef5
? selinux file permission+0x122/0x570
full proxy read+0x11f/0x180
? pfx full proxy read+0x10/0x10
vfs read+0x1a0/0xc20
? pfx vfs read+0x10/0x10
? srso alias return thunk+0x5/0xfbef5
? do sys newfstat+0xa6/0x100
? find held lock+0x2b/0x80
? pfx do sys newfstat+0x10/0x10
ksys read+0x111/0x200
? pfx ksys read+0x10/0x10
? full proxy llseek+0x11e/0x170
do syscall 64+0x115/0x6a0
entry SYSCALL 64 after hwframe+0x77/0x7f
RIP: 0033:0x7f7e392e7687
Code: 48 89 fa 4c 89 df e8 58 b3 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff
RSP: 002b:00007fff5f7b9180 EFLAGS: 00000202 ORIG RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007f7e39253780 RCX: 00007f7e392e7687
RDX: 0000000000002000 RSI: 000000003d2e9b00 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 00007f7e39253700
R13: 0000000000002000 R14: 00007f7e38d7e2c0 R15: 0000000000a55b98
Allocated by task 425:
kasan save stack+0x33/0x60
kasan sav
---truncated---
Found an issue in the description? Have something to add? Feel free to write us 👾