[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <875xd39jgn.wl-tiwai@suse.de>
Date: Sun, 28 Sep 2025 08:31:20 +0200
From: Takashi Iwai <tiwai@...e.de>
To: Jeongjun Park <aha310510@...il.com>
Cc: clemens@...isch.de,
perex@...ex.cz,
tiwai@...e.com,
hdanton@...a.com,
linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org,
stable@...r.kernel.org,
syzbot+f02665daa2abeef4a947@...kaller.appspotmail.com
Subject: Re: [PATCH v2] ALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free
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@...r.kernel.org>
> Reported-by: syzbot+f02665daa2abeef4a947@...kaller.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@...il.com>
Thanks, applied now.
Takashi
Powered by blists - more mailing lists