From: Takashi Iwai <tiwai@suse.de>
To: Jeongjun Park <aha310510@gmail.com>
Cc: clemens@ladisch.de, perex@perex.cz, tiwai@suse.com,
hdanton@sina.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
syzbot+f02665daa2abeef4a947@syzkaller.appspotmail.com
Subject: Re: [PATCH v2] ALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free
Date: Sun, 28 Sep 2025 08:31:20 +0200 [thread overview]
Message-ID: <875xd39jgn.wl-tiwai@suse.de> (raw)
In-Reply-To: <20250927173924.889234-1-aha310510@gmail.com>
On Sat, 27 Sep 2025 19:39:24 +0200,
Jeongjun Park wrote:
>
> The previous commit 0718a78f6a9f ("ALSA: usb-audio: Kill timer properly at
> removal") patched a UAF issue caused by the error timer.
>
> However, because the error timer kill added in this patch occurs after the
> endpoint delete, a race condition to UAF still occurs, albeit rarely.
>
> Additionally, since kill-cleanup for urb is also missing, freed memory can
> be accessed in interrupt context related to urb, which can cause UAF.
>
> Therefore, to prevent this, error timer and urb must be killed before
> freeing the heap memory.
>
> Cc: <stable@vger.kernel.org>
> Reported-by: syzbot+f02665daa2abeef4a947@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=f02665daa2abeef4a947
> Fixes: 0718a78f6a9f ("ALSA: usb-audio: Kill timer properly at removal")
> Signed-off-by: Jeongjun Park <aha310510@gmail.com>
Thanks, applied now.
Takashi
prev parent reply other threads:[~2025-09-28 6:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-27 17:39 [PATCH v2] ALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free Jeongjun Park
2025-09-28 6:31 ` 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=875xd39jgn.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=aha310510@gmail.com \
--cc=clemens@ladisch.de \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=stable@vger.kernel.org \
--cc=syzbot+f02665daa2abeef4a947@syzkaller.appspotmail.com \
--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