android_kernel_sony_msm8994.../sound
Takashi Iwai 2e30ca4e3c ALSA: info: Drop WARN_ON() from buffer NULL sanity check
commit 60379ba08532eca861e933b389526a4dc89e0c42 upstream.

snd_info_get_line() has a sanity check of NULL buffer -- both buffer
itself being NULL and buffer->buffer being NULL.  Basically both
checks are valid and necessary, but the problem is that it's with
snd_BUG_ON() macro that triggers WARN_ON().  The latter condition
(NULL buffer->buffer) can be met arbitrarily by user since the buffer
is allocated at the first write, so it means that user can trigger
WARN_ON() at will.

This patch addresses it by simply moving buffer->buffer NULL check out
of snd_BUG_ON() so that spurious WARNING is no longer triggered.

Reported-by: syzbot+e42d0746c3c3699b6061@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200717084023.5928-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: Ib2982f1bfd375ce7ac022071607de4e6c498acc1
2020-08-28 15:29:27 +08:00
..
aoa
arm Merge tag 'v3.10.91' into lineage-15.1 2020-05-18 01:34:34 +08:00
atmel
core ALSA: info: Drop WARN_ON() from buffer NULL sanity check 2020-08-28 15:29:27 +08:00
drivers Merge tag 'v3.10.103' into lineage-15.1 2020-05-18 01:35:04 +08:00
firewire
i2c ALSA: ak411x: Fix stall in work callback 2015-02-11 14:48:17 +08:00
isa Kconfig: rename HAS_IOPORT to HAS_IOPORT_MAP 2014-08-15 11:41:43 -07:00
mips
oss sound/oss: fix deadlock in sequencer_ioctl(SNDCTL_SEQ_OUTOFBAND) 2015-05-17 09:51:33 -07:00
parisc
pci Merge tag 'v3.10.107' into lineage-15.1 2020-05-18 01:35:04 +08:00
pcmcia
ppc
sh
soc ASoC: compress: Use power efficient workqueue 2020-05-22 11:58:27 +08:00
sparc
spi
synth Merge tag 'v3.10.91' into lineage-15.1 2020-05-18 01:34:34 +08:00
usb Merge tag 'v3.10.107' into lineage-15.1 2020-05-18 01:35:04 +08:00
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c
sound_firmware.c