[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250927155052.880528-1-aha310510@gmail.com>
Date: Sun, 28 Sep 2025 00:50:52 +0900
From: Jeongjun Park <aha310510@...il.com>
To: syzbot+f02665daa2abeef4a947@...kaller.appspotmail.com
Cc: aha310510@...il.com,
clemens@...isch.de,
hdanton@...a.com,
linux-kernel@...r.kernel.org,
linux-sound@...r.kernel.org,
perex@...ex.cz,
syzkaller-bugs@...glegroups.com,
tiwai@...e.de
Subject: Re: [syzbot] [sound?] [usb?] general protection fault in snd_usbmidi_do_output
syzbot <syzbot+f02665daa2abeef4a947@...kaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot has tested the proposed patch and the reproducer did not trigger any issue:
>
> Reported-by: syzbot+f02665daa2abeef4a947@...kaller.appspotmail.com
> Tested-by: syzbot+f02665daa2abeef4a947@...kaller.appspotmail.com
>
> Tested on:
>
#syz test upstream master
---
sound/usb/midi.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/sound/usb/midi.c b/sound/usb/midi.c
index acb3bf92857c..97e7e7662b12 100644
--- a/sound/usb/midi.c
+++ b/sound/usb/midi.c
@@ -1522,15 +1522,14 @@ static void snd_usbmidi_free(struct snd_usb_midi *umidi)
{
int i;
+ if (!umidi->disconnected)
+ snd_usbmidi_disconnect(&umidi->list);
+
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
struct snd_usb_midi_endpoint *ep = &umidi->endpoints[i];
- if (ep->out)
- snd_usbmidi_out_endpoint_delete(ep->out);
- if (ep->in)
- snd_usbmidi_in_endpoint_delete(ep->in);
+ kfree(ep->out);
}
mutex_destroy(&umidi->mutex);
- timer_shutdown_sync(&umidi->error_timer);
kfree(umidi);
}
--
Powered by blists - more mailing lists