Not scored
ALSA: us144mkii: re-anchor capture URBs on resubmission
- Severity
- Not scored
- Exploit likelihood
- 0.17% (higher than 6% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: ALSA: us144mkii: re-anchor capture URBs on resubmission capture_urb_complete() resubmits each capture URB without anchoring it: usb_get_urb(urb); ret = usb_submit_urb(urb, GFP_ATOMIC); Anchoring is a property of a submission, not of the URB. The giveback path calls usb_unanchor_urb() 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->capture_anchor is empty. tascam_free_urbs(), tascam_disconnect(), tascam_suspend() and the stop-work path all call usb_kill_anchored_urbs(&tascam->capture_anchor) 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. tascam_free_urbs() then returns the capture transfer buffers with usb_free_coherent(), and snd_card_free() releases the snd_card allocation that embeds tascam (card->private_data). The controller completes the queued URBs afterwards, writing device-supplied data into the freed transfer buffer, and capture_urb_complete() dereferences the freed driver object. KASAN on 7.2.0-rc5 (arm64): BUG: KASAN: slab-use-after-free in dummy_timer Write of size 512 at addr ffff000015b62000 __asan_memcpy dummy_timer hrtimer_run_softirq Allocated by task 64: usb_alloc_coherent tascam_alloc_urbs tascam_probe Freed by task 170: usb_free_coherent tascam_free_urbs tascam_disconnect usb_unbind_interface BUG: KASAN: slab-use-after-free in capture_urb_complete Read of size 4 at addr ffff0000170ee878 Freed by task 170: release_card_device snd_card_free tascam_disconnect Restore the usb_anchor_urb() between the reference count bump and the resubmission. That also makes the handler's usb_unanchor_urb() failure arm meaningful again and restores usb_kill_anchored_urbs() 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
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 16f14f55141d4c55c3f321f93c328fff7cd6860a before 7779249561d14b8a17c0c83783225794e24a587d, from ab1db64912428cdf06a4f9542e16e0575e9ad59f before a5548ce916594c811bd90ce33d67baa3557a6791, from 5cff1529a2f9b3461a7f5a6e36a86682fc290534 before 2615f0fb90df8cf5a96133ca4be74294ed288604, from 6.18.39 before 6.18.45, from 7.1.4 before 7.1.9 | CVE List |
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: ALSA: us144mkii: re-anchor capture URBs on resubmission capture_urb_complete() resubmits each capture URB without anchoring it: usb_get_urb(urb); ret = usb_submit_urb(urb, GFP_ATOMIC); Anchoring is a property of a submission, not of the URB. The giveback path calls usb_unanchor_urb() 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->capture_anchor is empty. tascam_free_urbs(), tascam_disconnect(), tascam_suspend() and the stop-work path all call usb_kill_anchored_urbs(&tascam->capture_anchor) 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. tascam_free_urbs() then returns the capture transfer buffers with usb_free_coherent(), and snd_card_free() releases the snd_card allocation that embeds tascam (card->private_data). The controller completes the queued URBs afterwards, writing device-supplied data into the freed transfer buffer, and capture_urb_complete() dereferences the freed driver object. KASAN on 7.2.0-rc5 (arm64): BUG: KASAN: slab-use-after-free in dummy_timer Write of size 512 at addr ffff000015b62000 __asan_memcpy dummy_timer hrtimer_run_softirq Allocated by task 64: usb_alloc_coherent tascam_alloc_urbs tascam_probe Freed by task 170: usb_free_coherent tascam_free_urbs tascam_disconnect usb_unbind_interface BUG: KASAN: slab-use-after-free in capture_urb_complete Read of size 4 at addr ffff0000170ee878 Freed by task 170: release_card_device snd_card_free tascam_disconnect Restore the usb_anchor_urb() between the reference count bump and the resubmission. That also makes the handler's usb_unanchor_urb() failure arm meaningful again and restores usb_kill_anchored_urbs() 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>
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: ALSA: us144mkii: reanclar URBs de captura en la resubmisión capture_urb_complete() resomete cada URB de captura sin anclarlo: usb_get_urb(urb); ret = usb_submit_urb(urb, GFP_ATOMIC); El anclaje es una propiedad de una submisión, no del URB. La ruta de devolución llama a usb_unanchor_urb() antes de urb -> complete(), por lo que un URB resometido desde su propio gestor de completado está fuera del anclaje. Los URBs de captura se anclan una vez, al inicio del flujo, por lo que desde la primera completación en adelante tascam -> capture_anchor está vacío. tascam_free_urbs(), tascam_disconnect(), tascam_suspend() y la ruta de detención del trabajo llaman a usb_kill_anchored_urbs(&tascam -> capture_anchor) para recolectar los URBs de captura antes de que se libere algo. Con el anclaje vacío, esas llamadas regresan inmediatamente y los URBs permanecen en cola en el controlador de host. tascam_free_urbs() luego devuelve los búferes de transferencia de captura con usb_free_coherent(), y snd_card_free() libera la asignación de snd_card que incrusta tascam (card -> private_data). El controlador completa los URBs en cola después, escribiendo datos suministrados por el dispositivo en el búfer de transferencia liberado, y capture_urb_complete() desreferencia el objeto de controlador liberado. KASAN en 7.2.0-rc5 (arm64): ERROR: KASAN: uso después de liberación de slab en dummy_timer Escritura de tamaño 512 en la dirección ffff000015b62000 __asan_memcpy dummy_timer hrtimer_run_softirq Asignado por la tarea 64: usb_alloc_coherent tascam_alloc_urbs tascam_probe Liberado por la tarea 170: usb_free_coherent tascam_free_urbs tascam_disconnect usb_unbind_interface ERROR: KASAN: uso después de liberación de slab en capture_urb_complete Lectura de tamaño 4 en la dirección ffff0000170ee878 Liberado por la tarea 170: release_card_device snd_card_free tascam_disconnect Restaurar usb_anchor_urb() entre el incremento del contador de referencias y la resubmisión. Eso también hace que el brazo de fallo de usb_unanchor_urb() del gestor vuelva a ser significativo y restaura usb_kill_anchored_urbs() como una barrera en las rutas de desconexión, suspensión y detención del trabajo. El anclaje fue eliminado bajo la premisa de que el URB ya está anclado desde la submisión inicial, lo cual no se mantiene una vez que la primera devolución ha ocurrido. Descubierto por XBOW, clasificado por Baul Lee <baul.lee@xbow.com>
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-74639 changed 2026-08-22 | CVE Terms of Use |
| NVD | CVE-2026-74639 changed 2026-10-14 | Public domain |