OpenCloudOS-Kernel/sound/pci/ctxfi
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
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ct20k1reg.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ct20k2reg.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctamixer.c ALSA: ctxfi: Fix out-of-range access 2021-11-18 22:57:55 +01:00
ctamixer.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctatc.c ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctatc.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctdaio.c ALSA: ctxfi: Fix out-of-range access 2021-11-18 22:57:55 +01:00
ctdaio.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
cthardware.c ALSA: pci/ctxfi: fix kernel-doc warnings 2020-07-07 12:05:56 +02:00
cthardware.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
cthw20k1.c ALSA: pci: Simplify with dma_set_mask_and_coherent() 2021-01-15 11:17:00 +01:00
cthw20k1.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
cthw20k2.c ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits 2021-02-28 09:12:41 +01:00
cthw20k2.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctimap.c ALSA: pci/ctxfi: fix kernel-doc warnings 2020-07-07 12:05:56 +02:00
ctimap.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctmixer.c ALSA: pci/ctxfi: fix kernel-doc warnings 2020-07-07 12:05:56 +02:00
ctmixer.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctpcm.c ALSA: Convert strlcpy to strscpy when return value is unused 2021-01-08 09:30:05 +01:00
ctpcm.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctresource.c ALSA: ctxfi: Fix out-of-range access 2021-11-18 22:57:55 +01:00
ctresource.h ALSA: ctxfi: Fix out-of-range access 2021-11-18 22:57:55 +01:00
ctsrc.c ALSA: ctxfi: Fix out-of-range access 2021-11-18 22:57:55 +01:00
ctsrc.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
cttimer.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 364 2019-06-05 17:37:09 +02:00
cttimer.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ctvmem.c ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctvmem.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
xfi.c module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00