Takashi Iwai 175b8d89fe ALSA: pcm: oss: Fix potential out-of-bounds shift
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>
2020-12-14 09:10:39 +01:00
..
2020-01-05 16:14:57 +01:00
2020-10-26 15:26:31 +01:00
2020-10-26 15:26:31 +01:00
2020-03-30 13:43:00 +02:00
2020-10-26 15:26:31 +01:00
2020-09-09 18:32:52 +02:00