linux/sound/usb/usx2y
HyeongJun An 147996e7e7 ALSA: usx2y: us144mkii: fix work UAF on disconnect
tascam_disconnect() cancels capture_work and midi_in_work before
usb_kill_anchored_urbs() kills the capture/MIDI-in URBs.  Those URBs
self-resubmit, and their completion handlers reschedule the work.

A URB that completes in the small window between cancel_work_sync() and
usb_kill_anchored_urbs() therefore re-arms the work after its only
cancel.  Nothing cancels it again before snd_card_free() frees the
card-private tascam structure, so the work handler then runs on freed
memory.

Kill the anchored URBs before cancelling the work; once the work is
cancelled no remaining URB can complete to re-arm it.

Fixes: c1bb0c13e4 ("ALSA: usb-audio: us144mkii: Implement audio capture and decoding")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
Link: https://patch.msgid.link/20260701095231.1020811-1-sammiee5311@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-07-01 13:54:23 +02:00
..
Makefile ALSA: usb-audio: Add infrastructure for TASCAM US-144MKII 2025-08-15 17:53:47 +02:00
us122l.c ALSA: us122l: drop redundant interface references 2026-03-05 14:00:55 +01:00
us122l.h ALSA: us122l: Drop mmap_count field 2024-11-13 13:33:47 +01:00
us144mkii_capture.c ALSA: us144mkii: capture_urb_complete: redundant usb_anchor_urb corrupts anchor list on each resubmission 2026-06-29 12:17:18 +02:00
us144mkii_controls.c ALSA: us144mkii: Drop kernel-doc markers 2026-02-26 16:56:36 +01:00
us144mkii_midi.c ALSA: us144mkii: Drop kernel-doc markers 2026-02-26 16:56:36 +01:00
us144mkii_pcm.c ALSA: usx2y: Relax __free() variable declarations 2025-12-17 10:08:30 +01:00
us144mkii_pcm.h ALSA: usb-audio: us144mkii: Implement audio capture and decoding 2025-08-15 17:53:47 +02:00
us144mkii_playback.c ALSA: us144mkii: Drop kernel-doc markers 2026-02-26 16:56:36 +01:00
us144mkii.c ALSA: usx2y: us144mkii: fix work UAF on disconnect 2026-07-01 13:54:23 +02:00
us144mkii.h ALSA: usb-audio: us144mkii: Fixes for handshake, MIDI out and cleanup 2025-08-26 10:59:46 +02:00
usb_stream.c ALSA: usx2y: Drop no longer used variable 2024-08-09 09:57:33 +02:00
usb_stream.h ALSA: usx2y: Use standard print API 2024-08-08 07:49:47 +02:00
usbus428ctldefs.h ALSA: usx2y: Fix potential leaks of uninitialized memory 2021-05-17 16:04:10 +02:00
usbusx2y.c ALSA: usx2y: Drain pending US-428 pipe-4 output commands 2026-05-19 08:09:36 +02:00
usbusx2y.h ALSA: usx2y: validate nrpacks module parameter on probe 2025-03-03 13:40:33 +01:00
usbusx2yaudio.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
usx2y.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
usX2Yhwdep.c ALSA: usx2y: Use safer strscpy() instead of strcpy() 2025-07-11 09:53:35 +02:00
usX2Yhwdep.h ALSA: usx2y: Fix spaces 2021-05-17 16:03:46 +02:00
usx2yhwdeppcm.c ALSA: usx2y: Use guard() for mutex locks 2025-09-01 13:54:05 +02:00
usx2yhwdeppcm.h ALSA: usx2y: Avoid camelCase 2021-05-17 16:03:34 +02:00