1
0
Fork 0
alistair23-linux/sound/core/oss
Takashi Iwai 14482dc42c 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-21 13:27:06 +01:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
copy.c ALSA: Kill snd_assert() in sound/core/* 2008-08-13 11:46:35 +02:00
io.c ALSA: pcm: Build OSS writev/readv helpers conditionally 2017-06-02 19:38:26 +02:00
linear.c ALSA: pcm: oss: Avoid potential buffer overflows 2019-12-13 08:42:38 +01:00
mixer_oss.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
mulaw.c ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check 2020-09-09 19:12:32 +02:00
pcm_oss.c ALSA: pcm: oss: Fix potential out-of-bounds shift 2020-12-21 13:27:06 +01:00
pcm_plugin.c ALSA: pcm: oss: Place the plugin buffer overflow checks correctly 2020-05-06 08:15:08 +02:00
pcm_plugin.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
rate.c ALSA: pcm: oss: Use struct_size() helper 2019-05-24 07:59:19 +02:00
route.c ALSA: pcm: oss: Avoid potential buffer overflows 2019-12-13 08:42:38 +01:00