]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: usb: Fix UAF at delayed release of MIDI2 EPs
authorTakashi Iwai <tiwai@suse.de>
Sat, 8 Aug 2026 15:20:06 +0000 (17:20 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sat, 8 Aug 2026 15:51:43 +0000 (17:51 +0200)
commitf8a80cfb68613fb7e6452b66447dbc63f435d140
treeb8e6a8bae5a4161028ecfff817ead1c01291bdba
parenta8934c2c6dfd72901cf3cc0de28e85eb902a61a4
ALSA: usb: Fix UAF at delayed release of MIDI2 EPs

The recent fix for UAF in ump_to_endpoint() caused another UAF because
it tries to dereference the UMP endpoint object, but this might be
executed at a delayed context where the endpoint has been already
released.

Add private_free to clear the associated data for avoiding the further
dereference for delayed releases.

Fixes: 4a05b2d1b464 ("ALSA: usb-audio: fix use-after-free in ump_to_endpoint()")
Reported-by: syzbot+565b1138cfbe549d4422@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=565b1138cfbe549d4422
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20260808152009.1947835-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/midi2.c