CVE-2026-143181: ALSA: caiaq: Kill EP1 URB before unregistering the input device

Published Dec 3, 2026
·
Updated

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

ALSA: caiaq: Kill EP1 URB before unregistering the input device

snddisconnect() unregisters the input device via sndusbcaiaqinputdisconnect() and only afterwards kills the EP1 command URB (cdev->ep1inurb). The EP1 completion handler usbep1commandreplydispatch() feeds sndusbcaiaqinputdispatch() for EP1CMDREAD{ERP,ANALOG,IO} replies, which report into cdev->inputdev. Since commit b04dcbb7f7b1 ("ALSA: caiaq: Use sndcardfreewhenclosed() at disconnection") the input device is unregistered from sndusbcaiaqinputdisconnect() but cdev->inputdev is cleared only later, in sndusbcaiaqinputfree() from the card destructor. As the dispatch guard only tests cdev->inputdev for NULL, an EP1 reply that completes after inputunregisterdevice() but before cdev->ep1inurb is killed reports into an input device that has already been unregistered and, with no evdev client holding it open, freed.

Normally the window is closed by the USB core: usbunbindinterface() calls usbdisableinterface() before ->disconnect(), which flushes the EP1 URB as long as endpoint 0x81 belongs to the interface being unbound. But caiaq addresses EP1 through the device-wide pipe usbrcvbulkpipe(usbdev, 0x1) without checking which interface owns the endpoint. If a device declares it in another interface, the URB stays live across snddisconnect() of the interface that owns the card.

This needs a crafted device descriptor; a device that has EP1 in the interface caiaq is bound to is not affected.

Kill cdev->ep1inurb (and the paired midiouturb) before the input and audio disconnect helpers, so no EP1 completion can run once the input device has been unregistered.

Reproduced under KASAN with raw-gadget + dummyhcd emulating an Audio Kontrol 1 (17cc:0815) with the EP1 bulk pair in interface 1: only interface 0 was bound to snd-usb-caiaq and then unbound through sysfs while the gadget flooded EP1 with EP1CMDREADERP replies. With no PCM stream running the window is very short and was only hit by stalling the unbinding CPU with a kgdb breakpoint at sndusbcaiaqaudiodisconnect(). With the fix applied, the same test runs clean.

BUG: KASAN: slab-use-after-free in inputevent+0x3a/0xc0 Read of size 8 at addr ffff8880151a4028 by task sh/118

Call Trace: <IRQ> inputevent+0x3a/0xc0 sndusbcaiaqinputdispatch+0xab2/0xf00 usbep1commandreplydispatch+0x1f3/0x580 usbhcdgivebackurb+0x246/0x400 dummytimer+0x1415/0x3380 hrtimerrunqueues+0x39d/0x800 hrtimerrunsoftirq+0x187/0x2d0 handlesoftirqs+0x1ff/0x930 irqexitrcu+0x15b/0x210 irqexitrcu+0xe/0x20 sysvecapictimerinterrupt+0x81/0xb0 </IRQ> <TASK> asmsysvecapictimerinterrupt+0x1a/0x20 RIP: 0010:sndusbcaiaqaudiodisconnect+0x0/0x70 snddisconnect+0x81/0x110 usbunbindinterface+0x1a0/0x860 devicereleasedriverinternal+0x2c5/0x470 unbindstore+0xde/0x100 </TASK>

Allocated by task 80: inputallocatedevice+0x47/0x340 sndusbcaiaqinputinit+0x4c/0x1ac0 sndprobe+0xab3/0x1160 usbprobeinterface+0x2ea/0x810

Freed by task 118: kfree+0x1ea/0x5c0 inputdevrelease+0xab/0xd0 devicerelease+0xcf/0x250 kobjectput+0x169/0x320 snddisconnect+0x79/0x110 usbunbindinterface+0x1a0/0x860

Affected Software

11 affected componentsFixes available
Linux Linux kernel
linux/kernel>=4.19.325<4.20
4.20
linux/kernel>=5.4.287<5.5
5.5
linux/kernel>=5.10.231<5.10.276
5.10.276
linux/kernel>=5.15.174<5.15.227
5.15.227
linux/kernel>=6.1.120<6.2
6.2
linux/kernel>=6.6.64<6.7
6.7
linux/kernel>=6.11.11<6.12
6.12
linux/kernel>=6.12.2<6.12.120
6.12.120
linux/kernel>=6.13.0<6.18.66
6.18.66
linux/kernel>=6.19.0<7.3.7
7.3.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 4.20
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.5
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.10.276
  4. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.15.227
  5. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.2
  6. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.7
  7. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12
  8. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.120
  9. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.66
  10. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.7
  11. Compensating control

    Kill cdev->ep1_in_urb and the paired midi_out_urb before unregistering the input device.

Event History

Dec 3, 2026
CVE Published
via MITRE·09:20 AM
Data Sourced
via MITRE·09:20 AM
Description
Data Sourced
via OSV·09:20 AM
DescriptionAffected Software
Data Sourced
via NVD·10:17 AM
Description

Frequently Asked Questions

1

Under what circumstances can the use-after-free occur?

An EP1 command reply must complete after the input device has been unregistered but before the EP1 URB is killed. The reported input device can be freed when no evdev client is holding it open.

2

Is a normal USB interface unbind expected to trigger the issue?

Normally, USB core unbind processing disables the interface before the driver's disconnect callback, flushing the EP1 URB. This protection applies as long as endpoint 0x81 belongs to the interface being unbound.

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