linux/sound
Takashi Iwai 37172cffc6 ALSA: pcm: oss: Fix potential out-of-bounds shift
commit 175b8d89fe upstream.

syzbot spotted a potential out-of-bounds shift in the PCM OSS layer
where it calculates the buffer size with the arbitrary shift value
given via an ioctl.

Add a range check for avoiding the undefined behavior.
As the value can be treated by a signed integer, the max shift should
be 30.

Reported-by: syzbot+df7dc146ebdd6435eea3@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201209084552.17109-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:25:42 +01:00
..
ac97 ALSA: ac97: Fix double free of ac97_codec_device 2019-07-31 07:27:11 +02:00
aoa ALSA: aoa: onyx: always initialize register read value 2020-01-27 14:51:02 +01:00
arm
atmel
core ALSA: pcm: oss: Fix potential out-of-bounds shift 2020-12-30 11:25:42 +01:00
drivers ALSA: opl3: fix infoleak in opl3 2020-07-16 08:17:25 +02:00
firewire ALSA: firewire: Clean up a locking issue in copy_resp_to_buf() 2020-11-24 13:27:24 +01:00
hda ALSA: hda: prevent undefined shift in snd_hdac_ext_bus_get_link() 2020-11-18 19:18:42 +01:00
i2c ALSA: i2c/cs8427: Fix int to char conversion 2019-12-01 09:16:36 +01:00
isa ALSA: isa/wavefront: prevent out of bounds write in ioctl 2020-06-25 15:32:48 +02:00
mips
oss
parisc
pci ALSA: hda/generic: Add option to enforce preferred_dacs pairs 2020-12-11 13:25:01 +01:00
pcmcia
ppc
sh ALSA: sh: Fix compile warning wrt const 2020-02-24 08:34:45 +01:00
soc ASoC: qcom: lpass-platform: Fix memory leak 2020-11-24 13:27:22 +01:00
sparc
spi
synth ALSA: emux: Fix potential Spectre v1 vulnerabilities 2019-01-09 17:38:36 +01:00
usb ALSA: usb-audio: Fix control 'access overflow' errors from chmap 2020-12-30 11:25:42 +01:00
x86 ALSA: x86: Fix runtime PM for hdmi-lpe-audio 2019-03-27 14:14:41 +09:00
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c sound: fix a memory leak bug 2019-08-16 10:12:39 +02:00