OpenCloudOS-Kernel/sound/pci/asihpi
Takashi Iwai f9d94b57e3 ALSA: asihpi: Hardening for potential Spectre v1
As recently Smatch suggested, a couple of places in ASIHPI driver may
expand the array directly from the user-space value with speculation:
  sound/pci/asihpi/hpimsginit.c:70 hpi_init_response() warn: potential spectre issue 'res_size' (local cap)
  sound/pci/asihpi/hpioctl.c:189 asihpi_hpi_ioctl() warn: potential spectre issue 'adapters'

This patch puts array_index_nospec() for hardening against them.

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>
2018-04-25 10:37:47 +02:00
..
Makefile ALSA: Add support of AudioScience ASI boards 2010-04-22 07:21:53 +02:00
asihpi.c ALSA: asihpi: clean up a couple of build warnings 2017-10-16 14:48:11 +02:00
hpi.h ALSA: asihpi: New I/O types - AVB & BLUlink, DAB Rf receiver 2014-11-22 22:25:51 +01:00
hpi6000.c ALSA: asihpi: fix an information leak in asihpi_hpi_ioctl() 2014-12-31 14:12:43 +01:00
hpi6000.h ALSA: asihpi - Update copyright to 2011 2011-12-22 08:12:57 +01:00
hpi6205.c ALSA: asihpi: Add support for stream interrupt. 2014-11-22 22:33:13 +01:00
hpi6205.h ALSA: asihpi - Increase request and response buffer sizes 2011-07-22 07:45:26 +02:00
hpi_internal.h ALSA: asihpi: increase tuner pad cache size 2014-12-18 08:48:24 +01:00
hpi_version.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hpicmn.c ALSA: asihpi: Refactor control cache code. 2014-11-22 22:29:58 +01:00
hpicmn.h ALSA: asihpi: Add support for stream interrupt. 2014-11-22 22:33:13 +01:00
hpidebug.c ALSA: asihpi: Put missing KERN_CONT prefix 2017-08-31 11:01:31 +02:00
hpidebug.h ALSA: asihpi - Update copyright to 2011 2011-12-22 08:12:57 +01:00
hpidspcd.c ALSA: asihpi: relax firmware version check 2014-12-18 08:40:06 +01:00
hpidspcd.h ALSA: asihpi - Split hpi version info into separate header file. 2011-12-22 08:12:56 +01:00
hpifunc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hpimsginit.c ALSA: asihpi: Hardening for potential Spectre v1 2018-04-25 10:37:47 +02:00
hpimsginit.h ALSA: asihpi - Update copyright to 2011 2011-12-22 08:12:57 +01:00
hpimsgx.c ALSA: asihpi: Turn off msg/resp logging after DSP has crashed. 2014-11-22 22:33:25 +01:00
hpimsgx.h ALSA: asihpi - Update copyright to 2011 2011-12-22 08:12:57 +01:00
hpioctl.c ALSA: asihpi: Hardening for potential Spectre v1 2018-04-25 10:37:47 +02:00
hpioctl.h ALSA: pci: remove __dev* attributes 2012-12-07 07:20:55 +01:00
hpios.c ALSA: asihpi - fix return value of hpios_locked_mem_alloc() 2012-03-30 16:24:48 +02:00
hpios.h ALSA: asihpi: Add support for stream interrupt. 2014-11-22 22:33:13 +01:00
hpipcida.h ALSA: asihpi - Update copyright to 2011 2011-12-22 08:12:57 +01:00