From: Takashi Iwai <tiwai@suse.de>
To: HyeongJun An <sammiee5311@gmail.com>
Cc: "Takashi Iwai" <tiwai@suse.com>,
"Jaroslav Kysela" <perex@perex.cz>,
"Šerif Rami" <ramiserifpersia@gmail.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] ALSA: usx2y: us144mkii: fix work UAF on disconnect
Date: Wed, 01 Jul 2026 13:56:11 +0200 [thread overview]
Message-ID: <8733y2vs84.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260701095231.1020811-1-sammiee5311@gmail.com>
On Wed, 01 Jul 2026 11:52:31 +0200,
HyeongJun An wrote:
>
> 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: c1bb0c13e430 ("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>
Applied now. Thanks.
Takashi
prev parent reply other threads:[~2026-07-01 11:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 9:52 [PATCH] ALSA: usx2y: us144mkii: fix work UAF on disconnect HyeongJun An
2026-07-01 11:56 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8733y2vs84.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=ramiserifpersia@gmail.com \
--cc=sammiee5311@gmail.com \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox