From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D92A221F17; Wed, 4 Feb 2026 14:47:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770216457; cv=none; b=cxbRfZqbLqGyAOMM4IJk0T/uA0IUpromK3C9veYCPjvtCVpbaGXUuBWtP5WUswVJmnX1B5Mq2E0FRt4whQJ5im546w1l9/ue5049/eqby03k7b4t8Rykpw49tooex3TxbUUsOYvFd6i0vEpdLd4G7FElrR2cLt6w59W9gKTeQJc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770216457; c=relaxed/simple; bh=lUQqjUfi1OlME1FKaHTcsqp+a5OlC3FCaegi4Ncdjv0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uVCcNwUu7MBK+gC1RLoaxkKvjIWhdSlDuSdZU1nBRs/xDZHyni7abIK4KXUqzyzd7r1SVI31M9coqbezaEbBAW15kDtV3xMiQk0Ei8Sim6uj9rnzqFlkiZWLeILbAkepLezXMdlJhLkiSyHjeqRzPtCPO7XeZLwXKB0rhBGcTxM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0zKYe2Ij; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="0zKYe2Ij" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 997D0C4CEF7; Wed, 4 Feb 2026 14:47:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1770216457; bh=lUQqjUfi1OlME1FKaHTcsqp+a5OlC3FCaegi4Ncdjv0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0zKYe2Ij5qzMjro2th0rJnnmU08L0FZdLxzKC2xYMZMtr2zMs7KyMd6tZhR5BCSej +9hH9I224uIJfRcW/EtSavfiiWfhgNjhqm5zIcsVithEk+DYvgXKjYks+U+xQkiwJE 0wtTrNy8jo1CAE9wpQfoVM42eYuofSW8PvUM9vBI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Salvatore Bonaccorso , Karsten Hohmeier , Takashi Iwai Subject: [PATCH 5.10 092/161] ALSA: ctxfi: Fix potential OOB access in audio mixer handling Date: Wed, 4 Feb 2026 15:39:15 +0100 Message-ID: <20260204143855.055475328@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260204143851.755002596@linuxfoundation.org> References: <20260204143851.755002596@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai 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 Tested-by: Karsten Hohmeier Closes: https://bugs.debian.org/1121535 Cc: 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 Signed-off-by: Greg Kroah-Hartman --- sound/pci/ctxfi/ctamixer.c | 2 ++ 1 file changed, 2 insertions(+) --- a/sound/pci/ctxfi/ctamixer.c +++ b/sound/pci/ctxfi/ctamixer.c @@ -205,6 +205,7 @@ static int amixer_rsc_init(struct amixer /* Set amixer specific operations */ amixer->rsc.ops = &amixer_basic_rsc_ops; + amixer->rsc.conj = 0; amixer->ops = &amixer_ops; amixer->input = NULL; amixer->sum = NULL; @@ -369,6 +370,7 @@ static int sum_rsc_init(struct sum *sum, return err; sum->rsc.ops = &sum_basic_rsc_ops; + sum->rsc.conj = 0; return 0; }