PT-2026-166523
CVE-2026-142800
·
تاريخ النشر
2026-12-03
·
تاريخ التحديث
2026-12-03
الوصف من
الدرجة
N/A
غير متوفرلا تتوفر حاليًا تقييمات أو مقاييس للخطورة. سنحدّث المعلومات المقابلة في الصفحة فور توفرها.
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:
- card->shutdown is set to 1
- device del(&card->card dev) drops the kobject reference on the parent USB interface device (card->dev = &intf->dev)
- 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().
وجدت خطأً في الوصف؟ لديك ما تضيفه؟ لا تتردد في مراسلتنا 👾