WSL2-Linux-Kernel/sound/drivers/opl3
Takashi Iwai b67a05364e ALSA: opl3: Hardening for potential Spectre v1
commit 7f054a5bee upstream.

As recently Smatch suggested, one place in OPL3 driver may expand the
array directly from the user-space value with speculation:
  sound/drivers/opl3/opl3_synth.c:476 snd_opl3_set_voice() warn: potential spectre issue 'snd_opl3_regmap'

This patch puts array_index_nospec() for hardening against it.

BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-01 12:58:15 -07:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
opl3_drums.c [ALSA] Remove xxx_t typedefs: OPL3 2006-01-03 12:18:04 +01:00
opl3_lib.c ALSA: opl3: Delete an error message for a failed memory allocation in snd_opl3_new() 2017-08-12 23:34:33 +02:00
opl3_midi.c ALSA: opl3: Put missing KERN_CONT prefix 2017-08-31 11:01:03 +02:00
opl3_oss.c ALSA: opl3: Kill unused set_fs() 2017-05-17 07:13:12 +02:00
opl3_seq.c ALSA: seq: Allow the tristate build of OSS emulation 2017-06-09 22:09:45 +02:00
opl3_synth.c ALSA: opl3: Hardening for potential Spectre v1 2018-05-01 12:58:15 -07:00
opl3_voice.h ALSA: seq: Allow the tristate build of OSS emulation 2017-06-09 22:09:45 +02:00