CVE-2026-74639: ALSA: us144mkii: re-anchor capture URBs on resubmission
In the Linux kernel, the following vulnerability has been resolved:
ALSA: us144mkii: re-anchor capture URBs on resubmission
captureurbcomplete() resubmits each capture URB without anchoring it:
usbgeturb(urb); ret = usbsubmiturb(urb, GFPATOMIC);
Anchoring is a property of a submission, not of the URB. The giveback path calls usbunanchorurb() before urb->complete(), so an URB resubmitted from its own completion handler is off the anchor. The capture URBs are anchored once, at stream start, so from the first completion onward tascam->captureanchor is empty.
tascamfreeurbs(), tascamdisconnect(), tascamsuspend() and the stop-work path all call usbkillanchoredurbs(&tascam->captureanchor) to reap the capture URBs before anything is freed. With the anchor empty those calls return immediately and the URBs stay queued on the host controller.
tascamfreeurbs() then returns the capture transfer buffers with usbfreecoherent(), and sndcardfree() releases the sndcard allocation that embeds tascam (card->privatedata). The controller completes the queued URBs afterwards, writing device-supplied data into the freed transfer buffer, and captureurbcomplete() dereferences the freed driver object.
KASAN on 7.2.0-rc5 (arm64):
BUG: KASAN: slab-use-after-free in dummytimer Write of size 512 at addr ffff000015b62000 asanmemcpy dummytimer hrtimerrunsoftirq Allocated by task 64: usballoccoherent tascamallocurbs tascamprobe Freed by task 170: usbfreecoherent tascamfreeurbs tascamdisconnect usbunbindinterface
BUG: KASAN: slab-use-after-free in captureurbcomplete Read of size 4 at addr ffff0000170ee878 Freed by task 170: releasecarddevice sndcardfree tascamdisconnect
Restore the usbanchorurb() between the reference count bump and the resubmission. That also makes the handler's usbunanchorurb() failure arm meaningful again and restores usbkillanchoredurbs() as a barrier on the disconnect, suspend and stop-work paths.
The anchoring was removed on the premise that the URB is already anchored from the initial submission, which does not hold once the first giveback has run.
Discovered by XBOW, triaged by Baul Lee <baul.lee@xbow.com>
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1 - Compensating control
In capture_urb_complete(), call usb_anchor_urb() for each capture URB after usb_get_urb(urb) and before resubmitting it with usb_submit_urb(urb, GFP_ATOMIC), restoring usb_kill_anchored_urbs(&tascam->capture_anchor) as a barrier on disconnect, suspend, and stop-work paths.
Event History
Frequently Asked Questions
When can this issue be triggered?
It can occur after capture URBs have been resubmitted and then the driver attempts to stop, suspend, disconnect, or free the capture stream. Because resubmitted capture URBs are no longer on the capture anchor, cleanup may free their buffers while those URBs remain queued on the USB host controller.
What is the resulting impact?
A queued capture URB can complete after its coherent transfer buffer and the embedded driver state have been freed. The completion path may then write device-supplied data to freed memory and dereference freed driver state, resulting in a use-after-free condition.