linux-stable/sound
Takashi Iwai 8af815ab05 ALSA: pcm: oss: Fix negative period/buffer sizes
commit 9d2479c960 upstream.

The period size calculation in OSS layer may receive a negative value
as an error, but the code there assumes only the positive values and
handle them with size_t.  Due to that, a too big value may be passed
to the lower layers.

This patch changes the code to handle with ssize_t and adds the proper
error checks appropriately.

Reported-by: syzbot+bb348e9f9a954d42746f@syzkaller.appspotmail.com
Reported-by: Bixuan Cui <cuibixuan@linux.alibaba.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1638270978-42412-1-git-send-email-cuibixuan@linux.alibaba.com
Link: https://lore.kernel.org/r/20211201073606.11660-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-14 10:16:54 +01:00
..
aoa ALSA: aoa: onyx: always initialize register read value 2020-01-27 14:46:41 +01:00
arm
atmel
core ALSA: pcm: oss: Fix negative period/buffer sizes 2021-12-14 10:16:54 +01:00
drivers ALSA: aloop: Fix initialization of controls 2021-04-16 11:57:47 +02:00
firewire ALSA: bebob: add support for ToneWeal FW66 2021-07-20 16:17:50 +02:00
hda ALSA: hda: avoid write to STATESTS if controller is in reset 2021-10-27 09:51:41 +02:00
i2c ALSA: i2c/cs8427: Fix int to char conversion 2019-12-01 09:13:39 +01:00
isa ALSA: gus: fix null pointer dereference on pointer block 2021-11-26 11:40:38 +01:00
mips
oss
parisc
pci ALSA: ctxfi: Fix out-of-range access 2021-12-08 08:46:47 +01:00
pcmcia ALSA: vxpocket: Fix invalid endian conversions 2018-08-22 07:46:10 +02:00
ppc ALSA: ppc: fix error return code in snd_pmac_probe() 2021-07-20 16:17:50 +02:00
sh ALSA: sh: Fix compile warning wrt const 2020-02-28 16:36:02 +01:00
soc ASoC: topology: Add missing rwsem around snd_ctl_remove() calls 2021-12-08 08:46:48 +01:00
sparc ALSA: sparc: Fix invalid snd_free_pages() at error path 2018-12-05 19:41:24 +01:00
spi
synth ALSA: synth: missing check for possible NULL after the call to kstrdup 2021-11-26 11:40:21 +01:00
usb ALSA: line6: fix control and interrupt message timeouts 2021-11-26 11:40:21 +01:00
x86 ALSA: x86: Fix runtime PM for hdmi-lpe-audio 2019-03-27 14:13:52 +09:00
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c sound: fix a memory leak bug 2019-08-16 10:13:46 +02:00