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 A53FD3D413D; Wed, 4 Feb 2026 14:57:36 +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=1770217056; cv=none; b=ZzSGmo95EPeoD/lYAHL+1f6/WklhmmDPW7AmRE9khJYZmVQW2hj7yktW3+jUT2VZxlUH4MIlhhUhoWMhqWvP0hdEZr8Dche3dL1CowuWBOlpB/TKJxZZjIVX/d07Yr3QeZ5T1s/CSVJgVEKMITK4EYtc0gKWptWPryQInd8GD70= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770217056; c=relaxed/simple; bh=f2sviqn/z2nOYbwBzXVNvj+I9MjN82kGL4zs6QE+kP0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KgzdbfPOsB6MB4RX3fMmz5x1rnkTSol/pktTcZAKbGf8imt2PUH7QlyJnbyuCPcV3H2jSdKbT+LtQqnZzfStcLYt1RlBiTLUyNa5zDGFJp7a6d50qUT2JRTaZ7gsrR3UprdMXhrVVqG+a3gr9Ri9WUZTtqcFdHPGTr137kjG4Qc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=aiTNt4pf; 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="aiTNt4pf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14D45C4CEF7; Wed, 4 Feb 2026 14:57:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1770217056; bh=f2sviqn/z2nOYbwBzXVNvj+I9MjN82kGL4zs6QE+kP0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aiTNt4pfTm5M0iS4JKIFhPB6VPFiaa/rT5jP+GpUrgEbcsAPBpymUpyHHCW1XTWD9 /rzSmkVO2ZU2DDIe4l37RqK/PC9lxpzbHgfS2D1DKLol3VMz/lx1R0/qO8ZKqlwG9F KvbwrJ7CvGtLz0lV7CbpgkLQ4aWA/iJqZoACeV6g= 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.15 111/206] ALSA: ctxfi: Fix potential OOB access in audio mixer handling Date: Wed, 4 Feb 2026 15:39:02 +0100 Message-ID: <20260204143902.203601117@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260204143858.193781818@linuxfoundation.org> References: <20260204143858.193781818@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.15-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; }