summaryrefslogtreecommitdiff
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-04-20 15:02:47 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-27 13:39:42 +0200
commit0b374f9efcca06c75fb8a7b6488dde6ccc0dc586 (patch)
treee67f10f4a83e604df0755700698bdad75ac737b9 /net/ipv6/tcp_ipv6.c
parentd1ca4feb81891046d3747928fa9a1a1596aa87d7 (diff)
ALSA: usb-audio: Clear MIDI port active flag after draining
commit 0665886ad1392e6b5bae85d7a6ccbed48dca1522 upstream. When a rawmidi output stream is closed, it calls the drain at first, then does trigger-off only when the drain returns -ERESTARTSYS as a fallback. It implies that each driver should turn off the stream properly after the drain. Meanwhile, USB-audio MIDI interface didn't change the port->active flag after the drain. This may leave the output work picking up the port that is closed right now, which eventually leads to a use-after-free for the already released rawmidi object. This patch fixes the bug by properly clearing the port->active flag after the output drain. Reported-by: syzbot+70e777a39907d6d5fd0a@syzkaller.appspotmail.com Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/00000000000011555605dceaff03@google.com Link: https://lore.kernel.org/r/20220420130247.22062-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
0 files changed, 0 insertions, 0 deletions