]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ALSA: pcm: Check PCM state at xfern compat ioctl
authorTakashi Iwai <tiwai@suse.de>
Wed, 2 May 2018 06:48:46 +0000 (08:48 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:24:54 +0000 (12:24 +0200)
commit0516929668addeaca59f787a6cac6e7000fe2515
tree959ac42bb007f9d9c7ffcf8dd02c7449d74a7df2
parentb12263b70a9483e3f415b20aeb2d0bfff3edf796
ALSA: pcm: Check PCM state at xfern compat ioctl

BugLink: http://bugs.launchpad.net/bugs/1778759
commit f13876e2c33a657a71bcbb10f767c0951b165020 upstream.

Since snd_pcm_ioctl_xfern_compat() has no PCM state check, it may go
further and hit the sanity check pcm_sanity_check() when the ioctl is
called right after open.  It may eventually spew a kernel warning, as
triggered by syzbot, depending on kconfig.

The lack of PCM state check there was just an oversight.  Although
it's no real crash, the spurious kernel warning is annoying, so let's
add the proper check.

Reported-by: syzbot+1dac3a4f6bc9c1c675d4@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>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
sound/core/pcm_compat.c