kernel-fxtec-pro1x/sound/core
Gustavo A. R. Silva 56971d62c7 ALSA: pcm: Fix potential Spectre v1 vulnerability
commit 94ffb030b6d31ec840bb811be455dd2e26a4f43e upstream.

stream is indirectly controlled by user-space, hence leading to
a potential exploitation of the Spectre variant 1 vulnerability.

This issue was detected with the help of Smatch:

sound/core/pcm.c:140 snd_pcm_control_ioctl() warn: potential spectre issue 'pcm->streams' [r] (local cap)

Fix this by sanitizing stream before using it to index pcm->streams

Notice that given that speculation windows are large, the policy is
to kill the speculation on the first load and not worry if it can be
completed with a dependent load/store [1].

[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Cc: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-09 17:38:36 +01:00
..
oss ALSA: oss: Use kvzalloc() for local buffer allocations 2018-12-01 09:37:25 +01:00
seq ALSA: seq: virmidi: Fix discarding the unsubscribed output 2018-08-14 22:50:52 +02:00
compress_offload.c ALSA: compress: Remove empty init and exit 2018-08-03 16:11:23 +02:00
control.c ALSA: control: Fix race between adding and removing a user element 2018-12-05 19:32:08 +01:00
control_compat.c
ctljack.c
device.c
hrtimer.c
hwdep.c
hwdep_compat.c
info.c
info_oss.c
init.c
isadma.c
jack.c
Kconfig
Makefile
memalloc.c ALSA: memalloc: Don't exceed over the requested size 2018-07-23 09:06:33 +02:00
memory.c
misc.c
pcm.c ALSA: pcm: Fix potential Spectre v1 vulnerability 2019-01-09 17:38:36 +01:00
pcm_compat.c
pcm_dmaengine.c
pcm_drm_eld.c
pcm_iec958.c
pcm_lib.c
pcm_local.h
pcm_memory.c
pcm_misc.c
pcm_native.c ALSA: pcm: Call snd_pcm_unlink() conditionally at closing 2018-12-13 09:16:16 +01:00
pcm_param_trace.h
pcm_timer.c
pcm_trace.h
rawmidi.c ALSA: rawmidi: Initialize allocated buffers 2018-09-03 15:16:43 +02:00
rawmidi_compat.c
seq_device.c
sgbuf.c
sound.c
sound_oss.c
timer.c ALSA: timer: catch invalid timer object creation 2018-07-22 10:42:41 +02:00
timer_compat.c
vmaster.c