]> git.ipfire.org Git - people/arne_f/kernel.git/commit
ALSA: rawmidi: Fix missing input substream checks in compat ioctls
authorTakashi Iwai <tiwai@suse.de>
Thu, 19 Apr 2018 16:16:15 +0000 (18:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:29:28 +0000 (09:29 +0200)
commitcd8c5937a7b3d903d6ec1ace829fcfaa978f099b
tree9dffa4ecf4190c846bdcb9dea3960214f3d849e5
parentf5ded53d953138865c1c8ffa01aed74a476f540d
ALSA: rawmidi: Fix missing input substream checks in compat ioctls

commit 8a56ef4f3ffba9ebf4967b61ef600b0a7ba10f11 upstream.

Some rawmidi compat ioctls lack of the input substream checks
(although they do check only for rfile->output).  This many eventually
lead to an Oops as NULL substream is passed to the rawmidi core
functions.

Fix it by adding the proper checks before each function call.

The bug was spotted by syzkaller.

Reported-by: syzbot+f7a0348affc3b67bc617@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/rawmidi_compat.c