PT-2026-166523

CVE-2026-142800

·

Published

2026-12-03

·

Updated

2026-12-03

Description by

Score
N/A
Not available

No 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: control: Fix UAF in snd ctl elem add() on card disconnect
A use-after-free can be triggered via SNDRV CTL IOCTL ELEM ADD when a USB audio card is disconnected while an ELEM ADD ioctl is in flight.
The reproducer parks the ioctl thread inside copy from user() using userfaultfd, then tears down the USB device. Unlike every other ALSA control user handler (ELEM INFO, ELEM READ, ELEM WRITE, TLV *), snd ctl elem add user() never calls snd power ref and wait(), so the parked thread holds no power reference. snd card disconnect() therefore cannot observe it via snd power sync ref() and proceeds unimpeded:
  1. card->shutdown is set to 1
  2. device del(&card->card dev) drops the kobject reference on the parent USB interface device (card->dev = &intf->dev)
  3. The USB core drops its own reference and calls device release(), freeing the struct usb interface, including the embedded struct device that card->dev points to
When the userfaultfd is resolved and the thread resumes, snd ctl elem add() acquires controls rwsem without checking card->shutdown and calls snd ctl add replace(). Because the reproducer pre-registered the same control, the CTL ADD EXCLUSIVE path calls dev err(card->dev, ...) on the freed USB interface:
KASAN: slab-use-after-free Read in dev printk
Add a card->shutdown guard immediately after acquiring controls rwsem in snd ctl elem add(). At that point card->shutdown is guaranteed to be stable: snd card disconnect() sets it before freeing the parent device, and it never transitions back to 0. A thread that acquired the lock before disconnect sees shutdown=0 and holds the write lock through the rest of the operation, preventing concurrent disconnect from proceeding past its own controls rwsem-less shutdown=1 store (which happened earlier, outside the lock) from racing with dev err().
Vendors
Affected products
Related identifiers
Found an issue in the description? Have something to add? Feel free to write us 👾