diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-12-09 09:45:52 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-12-14 09:10:39 +0100 |
commit | 175b8d89fe292796811fdee87fa39799a5b6b87a (patch) | |
tree | 2188693002fdf3c7e765d78be8a83b8c289f35c4 /mm/shmem.c | |
parent | ALSA: usb-audio: Fix potential out-of-bounds shift (diff) | |
download | linux-175b8d89fe292796811fdee87fa39799a5b6b87a.tar.xz linux-175b8d89fe292796811fdee87fa39799a5b6b87a.zip |
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>
Diffstat (limited to 'mm/shmem.c')
0 files changed, 0 insertions, 0 deletions