linux-stable/sound/core/oss
Takashi Iwai ff7e06a556 ALSA: pcm: oss: Fix regression by buffer overflow fix (again)
[ This is essentially the same fix as commit ae769d3556, but it's
  adapted to the latest code for 5.7; hence it contains no Fixes or
  other tags for avoid backport confusion -- tiwai ]

The recent fix for the OOB access in PCM OSS plugins (commit
f2ecf903ef: "ALSA: pcm: oss: Avoid plugin buffer overflow") caused a
regression on OSS applications.  The patch introduced the size check
in client and slave size calculations to limit to each plugin's buffer
size, but I overlooked that some code paths call those without
allocating the buffer but just for estimation.

This patch fixes the bug by skipping the size check for those code
paths while keeping checking in the actual transfer calls.

Link: https://lore.kernel.org/r/20200403073818.27943-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-04-03 09:38:50 +02: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-04 15:51:30 +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
mixer_oss.c ALSA: oss: More constifications 2020-01-05 16:14:58 +01:00
mulaw.c ALSA: pcm: oss: Avoid potential buffer overflows 2019-12-04 15:51:30 +01:00
pcm_oss.c ALSA: pcm: oss: Unlock mutex temporarily for sleeping at read/write 2020-02-14 18:17:13 +01:00
pcm_plugin.c ALSA: pcm: oss: Fix regression by buffer overflow fix (again) 2020-04-03 09:38:50 +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: core: Replace zero-length array with flexible-array member 2020-02-12 08:14:43 +01:00
route.c ALSA: pcm: oss: Avoid potential buffer overflows 2019-12-04 15:51:30 +01:00