OrangePi_CM5/sound/core
Fabio M. De Francesco 912797e54c ALSA: pcm: Test for "silence" field in struct "pcm_format_data"
commit 2f7a26abb8241a0208c68d22815aa247c5ddacab upstream.

Syzbot reports "KASAN: null-ptr-deref Write in
snd_pcm_format_set_silence".[1]

It is due to missing validation of the "silence" field of struct
"pcm_format_data" in "pcm_formats" array.

Add a test for valid "pat" and, if it is not so, return -EINVAL.

[1] https://lore.kernel.org/lkml/000000000000d188ef05dc2c7279@google.com/

Reported-and-tested-by: syzbot+205eb15961852c2c5974@syzkaller.appspotmail.com
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220409012655.9399-1-fmdefrancesco@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-20 09:23:27 +02:00
..
oss ALSA: oss: Fix PCM OSS buffer allocation overflow 2022-03-28 09:57:08 +02:00
seq ALSA: seq: Set upper limit of processed events 2022-01-27 10:54:22 +01:00
Kconfig
…
Makefile ALSA: ISA: not for M68K 2021-11-26 10:39:10 +01:00
compress_offload.c
…
control.c
…
control_compat.c ALSA: ctl: Fix copy of updated id with element read/write 2021-12-14 11:32:38 +01:00
ctljack.c
…
device.c
…
hrtimer.c
…
hwdep.c
…
hwdep_compat.c
…
info.c
…
info_oss.c
…
init.c
…
isadma.c
…
jack.c ALSA: jack: Add missing rwsem around snd_ctl_remove() calls 2022-01-27 10:54:04 +01:00
memalloc.c
…
memory.c
…
misc.c
…
pcm.c ALSA: pcm: Fix potential AB/BA lock with buffer_mutex and mmap_lock 2022-04-08 14:39:53 +02:00
pcm_compat.c
…
pcm_dmaengine.c
…
pcm_drm_eld.c
…
pcm_iec958.c
…
pcm_lib.c ALSA: pcm: Fix potential AB/BA lock with buffer_mutex and mmap_lock 2022-04-08 14:39:53 +02:00
pcm_local.h
…
pcm_memory.c ALSA: pcm: Fix races among concurrent prealloc proc writes 2022-03-28 09:57:09 +02:00
pcm_misc.c ALSA: pcm: Test for "silence" field in struct "pcm_format_data" 2022-04-20 09:23:27 +02:00
pcm_native.c ALSA: pcm: Fix potential AB/BA lock with buffer_mutex and mmap_lock 2022-04-08 14:39:53 +02:00
pcm_param_trace.h
…
pcm_timer.c
…
pcm_trace.h
…
rawmidi.c
…
rawmidi_compat.c
…
seq_device.c
…
sgbuf.c
…
sound.c
…
sound_oss.c
…
timer.c
…
timer_compat.c
…
vmaster.c
…