]> git.baikalelectronics.ru Git - 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)
committerTakashi Iwai <tiwai@suse.de>
Thu, 19 Apr 2018 16:16:15 +0000 (18:16 +0200)
commit92b25e5da2bf6a3be03e58a3eee6f3d5bba02b23
tree8af4f2628754d6ff9514e999bff1a186eee5a0f3
parent2af222cc75b99b752f73f72100298e104ca17597
ALSA: rawmidi: Fix missing input substream checks in compat ioctls

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>
sound/core/rawmidi_compat.c