linux/sound
Fabio M. De Francesco 377a80ca65 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:19:38 +02:00
..
ac97 ALSA: ac97: fix PM reference leak in ac97_bus_remove() 2021-07-20 16:10:42 +02:00
aoa
arm
atmel
core ALSA: pcm: Test for "silence" field in struct "pcm_format_data" 2022-04-20 09:19:38 +02:00
drivers ALSA: drivers: opl3: Fix incorrect use of vp->state 2021-12-29 12:23:36 +01:00
firewire ALSA: firewire-lib: fix uninitialized flag for AV/C deferred transaction 2022-04-15 14:18:09 +02:00
hda ALSA: hda: hdac_stream: fix potential locking issue in snd_hdac_stream_assign() 2021-11-26 10:47:23 +01:00
i2c
isa ALSA: cs4236: fix an incorrect NULL check on list iterator 2022-04-15 14:18:00 +02:00
mips
oss
parisc
pci ALSA: hda/realtek: Add quirk for Clevo PD50PNT 2022-04-20 09:19:38 +02:00
pcmcia
ppc ALSA: ppc: fix error return code in snd_pmac_probe() 2021-07-20 16:10:44 +02:00
sh
soc ASoC: topology: Allow TLV control to be either read or write 2022-04-15 14:18:30 +02:00
sparc
spi ALSA: spi: Add check for clk_enable() 2022-04-15 14:18:08 +02:00
synth ALSA: synth: missing check for possible NULL after the call to kstrdup 2021-11-17 09:48:19 +01:00
usb ALSA: usb-audio: Add mute TLV for playback volumes on RODE NT-USB 2022-03-28 08:46:45 +02:00
x86 ALSA: intel_hdmi: Fix reference to PCM buffer address 2022-03-08 19:07:46 +01:00
xen
Kconfig
Makefile
ac97_bus.c
last.c
sound_core.c