CVE-2026-139384: ALSA: pcm: Unlink substreams before releasing them

Published Nov 30, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

ALSA: pcm: Unlink substreams before releasing them

A closing PCM substream can remain in its linked group after the driver close callback has freed its private data. With two configured dummy capture substreams on the same PCM device, linked with LINK, PREPARE on the surviving substream can still visit the closing member:

Final close of A PREPARE on linked B ---------------- ------------------- sndpcmdrop(): group -> SETUP dohwfree(A) dummypcmclose(A): free dpcm Take sndpcmlinkrwsem for reading Walk the group, including A dummypcmprepare(A) Read freed timerops pcmreleaseprivate(A) sndpcmunlink(A)

Unlink at the start of final substream release, before dropping the stream or releasing driver resources. The link write lock waits for an existing group PREPARE, and unlink removes the closing member from later group actions. Keep the existing stop synchronization in dohwfree() before the driver resources are freed.

Make unlink independent of the pcmrelease callback so OSS substreams are covered too. Remove the native-only unlink callback and its registration, while retaining the callback hook for OSS cleanup.

The existing KASAN report below records the freed timerops read in dummypcmprepare().

KASAN report as below:

BUG: KASAN: slab-use-after-free in dummypcmprepare+0xb7/0xc0 Read of size 8 at addr ffff888106b35f00 by task alsapcmfixtur/491

Call Trace: <TASK> dumpstacklvl+0x93/0xd0 printreport+0xce/0x630 ? dummypcmprepare+0xb7/0xc0 ? srsoaliasreturnthunk+0x5/0xfbef5 ? virtaddrvalid+0x20d/0x410 ? dummypcmprepare+0xb7/0xc0 kasanreport+0xe0/0x110 ? dummypcmprepare+0xb7/0xc0 dummypcmprepare+0xb7/0xc0 sndpcmdoprepare+0x71/0xb0 sndpcmactiongroup+0x505/0xb30 sndpcmactionnonatomic+0xab/0x150 sndpcmcommonioctl+0x1bf5/0x3a50 ? srsoaliasreturnthunk+0x5/0xfbef5 ? dovfsioctl+0x1f5/0x1280 ? pfxdovfsioctl+0x10/0x10 ? ioctlhasperm.constprop.0.isra.0+0x34f/0x500 ? pfxsndpcmcommonioctl+0x10/0x10 ? fput+0x5ba/0xa60 ? srsoaliasreturnthunk+0x5/0xfbef5 sndpcmioctl+0x76/0xb0 ? pfxsndpcmioctl+0x10/0x10 x64sysioctl+0x163/0x1d0 dosyscall64+0x115/0x6a0 entrySYSCALL64afterhwframe+0x77/0x7f RIP: 0033:0x41ee8d Code: 04 25 28 00 00 00 48 89 45 c8 31 c0 48 8d 45 10 c7 45 b0 10 00 00 00 48 89 45 b8 48 8d 45 d0 48 89 45 c0 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1a 48 8b 45 c8 64 48 2b 04 25 28 00 00 00 RSP: 002b:00007ffcfa72fb60 EFLAGS: 00000246 ORIGRAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000000000041ee8d RDX: 0000000000000000 RSI: 0000000000004140 RDI: 0000000000000004 RBP: 00007ffcfa72fbb0 R08: 00007ffcfa72fb98 R09: 0000000000000110 R10: 0000000000000001 R11: 0000000000000246 R12: 00007ffcfa72fcd8 R13: 00007ffcfa72fcf0 R14: 00000000004a8f28 R15: 0000000000000001 </TASK>

Allocated by task 488: kasansavestack+0x33/0x60 kasansavetrack+0x14/0x30 kasankmalloc+0xaa/0xb0 kmalloccachenoprof+0x251/0x610 dummyhrtimercreate+0x4a/0x170 dummypcmopen+0xe7/0x730 sndpcmopensubstream+0x926/0x1580 sndpcmopen+0x28d/0x6d0 sndpcmcaptureopen+0x82/0xe0 sndopen+0x1ec/0x3e0 chrdevopen+0x21f/0x660 dodentryopen+0x5c8/0x1300 vfsopen+0x87/0x390 pathopenat+0x2460/0x3cd0 dofileopen+0x21e/0x470 dosysopenat2+0xf4/0x1b0 x64sysopenat+0x136/0x1e0 dosyscall64+0x115/0x6a0 entrySYSCALL64afterhwframe+0x77/0x7f

Freed by task 490: kasansavestack+0x33/0 ---truncated---

Affected Software

1 affected component
Linux Linux kernel

Event History

Nov 30, 2026
CVE Published
via MITRE·01:34 PM
Data Sourced
via MITRE·01:34 PM
Description

Frequently Asked Questions

1

What configuration is required for this issue to be reachable?

The described scenario requires two dummy capture substreams configured on the same PCM device and linked using the LINK operation. A PREPARE operation on the surviving linked substream must race with final close of the other substream.

2

What could an attacker or local user need to do to trigger the use-after-free?

They would need to cause one linked PCM substream to close while another member of the same linked group performs PREPARE. The closing driver's callback can free private data before the closing substream is removed from the group, allowing group traversal to invoke prepare on freed state.

3

Does the fix apply only to native ALSA PCM substreams?

No. The change makes unlinking independent of the pcm_release callback so that OSS substreams are also covered. The native-only unlink callback and its registration are removed.

4

What synchronization does the fix add?

The substream is unlinked at the start of final substream release, before stream teardown or driver-resource release. The link write lock waits for any in-progress group PREPARE, and existing stop synchronization in do_hw_free() remains in place before driver resources are freed.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203