linux-stable/sound/pci
Takashi Iwai fcf9e1df5a ALSA: ctxfi: Fix out-of-range access
commit 76c4718322 upstream.

The master and next_conj of rcs_ops are used for iterating the
resource list entries, and currently those are supposed to return the
current value.  The problem is that next_conf may go over the last
entry before the loop abort condition is evaluated, and it may return
the "current" value that is beyond the array size.  It was caught
recently as a GPF, for example.

Those return values are, however, never actually evaluated, hence
basically we don't have to consider the current value as the return at
all.  By dropping those return values, the potential out-of-range
access above is also fixed automatically.

This patch changes the return type of master and next_conj callbacks
to void and drop the superfluous code accordingly.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214985
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211118215729.26257-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-08 08:46:47 +01:00
..
ac97 ALSA: ac97: Fix incorrect bit shift at AC97-SPSA control write 2018-12-05 19:41:24 +01:00
ali5451
asihpi ALSA: asihpi: fix iounmap in error handler 2020-10-01 13:12:51 +02:00
au88x0 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
aw2
ca0106 ALSA: ca0106: fix error code handling 2020-09-09 19:03:11 +02:00
cs46xx ALSA: pci: delete repeated words in comments 2020-09-03 11:22:24 +02:00
cs5535audio ALSA: cs5535audio: Fix invalid endian conversion 2018-08-22 07:46:09 +02:00
ctxfi ALSA: ctxfi: Fix out-of-range access 2021-12-08 08:46:47 +01:00
echoaudio ALSA: echoaudio: Fix potential Oops in snd_echo_resume() 2020-08-21 09:48:23 +02:00
emu10k1 ALSA: emu10k1: Fix potential Spectre v1 vulnerabilities 2019-01-09 17:14:46 +01:00
hda ALSA: hda: Reduce udelay() at SKL+ position reporting 2021-11-26 11:40:32 +01:00
ice1712 ALSA: pci: delete repeated words in comments 2020-09-03 11:22:24 +02:00
korg1212
lola
lx6464es
mixart ALSA: mixart: Fix mutex deadlock 2020-11-24 13:05:52 +01:00
nm256 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
oxygen ALSA: pci: delete repeated words in comments 2020-09-03 11:22:24 +02:00
pcxhr
riptide
rme9652 ALSA: rme9652: don't disable if not enabled 2021-05-22 10:57:36 +02:00
trident ALSA: trident: Suppress gcc string warning 2018-12-08 13:03:38 +01:00
vx222 ALSA: vx222: Fix invalid endian conversions 2018-08-22 07:46:09 +02:00
ymfpci ALSA: ymfpci: Use common error handling code in snd_ymfpci_create() 2017-09-07 10:33:28 +02:00
ad1889.c
ad1889.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ak4531_codec.c
als300.c
als4000.c
atiixp.c
atiixp_modem.c
azt3328.c
azt3328.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bt87x.c
cmipci.c
cs4281.c
cs5530.c
ens1370.c
ens1371.c
es1938.c
es1968.c
fm801.c ALSA: fm801: add error handling for snd_ctl_add 2018-08-03 07:50:22 +02:00
intel8x0.c
intel8x0m.c ALSA: intel8x0m: Register irq handler after register initializations 2019-11-20 17:59:58 +01:00
Kconfig
maestro3.c ALSA: maestro3: Use common error handling code in two functions 2017-09-07 10:23:47 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rme32.c
rme96.c
sis7019.c
sis7019.h
sonicvibes.c
via82xx.c
via82xx_modem.c