linux/sound
Takashi Iwai 76c4718322 ALSA: ctxfi: Fix out-of-range access
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>
2021-11-18 22:57:55 +01:00
..
ac97
aoa
arm
atmel
core ALSA: memalloc: Remove a stale comment 2021-11-10 07:35:23 +01:00
drivers
firewire ALSA: fireworks: add support for Loud Onyx 1200f quirk 2021-11-11 14:02:02 +01:00
hda
i2c
isa
mips
oss
parisc
pci ALSA: ctxfi: Fix out-of-range access 2021-11-18 22:57:55 +01:00
pcmcia
ppc
sh
soc ASoC: Fixes for v5.16 2021-11-18 18:57:41 +01:00
sparc
spi
synth ALSA: synth: missing check for possible NULL after the call to kstrdup 2021-11-09 07:18:50 +01:00
usb
virtio
x86
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c