umber-kernel/sound/pci/ctxfi
Takashi Iwai 873e2360d2 ALSA: ctxfi: Fix potential OOB access in audio mixer handling
commit 61006c540cbdedea83b05577dc7fb7fa18fe1276 upstream.

In the audio mixer handling code of ctxfi driver, the conf field is
used as a kind of loop index, and it's referred in the index callbacks
(amixer_index() and sum_index()).

As spotted recently by fuzzers, the current code causes OOB access at
those functions.
| UBSAN: array-index-out-of-bounds in /build/reproducible-path/linux-6.17.8/sound/pci/ctxfi/ctamixer.c:347:48
| index 8 is out of range for type 'unsigned char [8]'

After the analysis, the cause was found to be the lack of the proper
(re-)initialization of conj field.

This patch addresses those OOB accesses by adding the proper
initializations of the loop indices.

Reported-by: Salvatore Bonaccorso <carnil@debian.org>
Tested-by: Karsten Hohmeier <linux@hohmatik.de>
Closes: https://bugs.debian.org/1121535
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/all/aSk8KJI35H7gFru6@eldamar.lan/
Link: https://patch.msgid.link/20260119133212.189129-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-01-30 10:32:23 +01:00
..
Makefile
ct20k1reg.h
ct20k2reg.h
ctamixer.c ALSA: ctxfi: Fix potential OOB access in audio mixer handling 2026-01-30 10:32:23 +01:00
ctamixer.h
ctatc.c ALSA: ctxfi: Use guard() for mutex locks 2025-09-01 13:52:40 +02:00
ctatc.h
ctdaio.c ALSA: ctxfi: Use guard() for spin locks 2025-09-01 13:52:40 +02:00
ctdaio.h
cthardware.c
cthardware.h
cthw20k1.c ALSA: ctxfi: Use guard() for spin locks 2025-09-01 13:52:40 +02:00
cthw20k1.h
cthw20k2.c
cthw20k2.h
ctimap.c
ctimap.h
ctmixer.c ALSA: ctxfi: Use safer strscpy() instead of strcpy() 2025-07-11 09:53:19 +02:00
ctmixer.h
ctpcm.c
ctpcm.h
ctresource.c
ctresource.h
ctsrc.c ALSA: ctxfi: Use guard() for spin locks 2025-09-01 13:52:40 +02:00
ctsrc.h
cttimer.c ALSA: ctxfi: Use guard() for spin locks 2025-09-01 13:52:40 +02:00
cttimer.h
ctvmem.c ALSA: ctxfi: Use guard() for mutex locks 2025-09-01 13:52:40 +02:00
ctvmem.h
xfi.c ALSA: ctxfi: Replace deprecated strcpy() with strscpy() 2025-06-09 09:53:30 +02:00