]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 15:49:32 +0000 (11:49 -0400)
commit7c00ad88a4e63c47f2967aa1e35e012b907e5e8d
treee36f3922f273ba4b4212c7ee9720b41c538bc087
parentf7c61f45445b236a2d066c9c6b9c89741c1ec000
ALSA: rawmidi: Fix missing input substream checks in compat ioctls

BugLink: http://bugs.launchpad.net/bugs/1773233
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
sound/core/rawmidi_compat.c