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 2684722A4E9; Thu, 12 Mar 2026 20:20:56 +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=1773346856; cv=none; b=G4xS3+OQd521PqqHizzZDf+n+BfJ+OjsnYyxUkAwyuCG0+831ZrhPO/UMlEZxCKfwN11bukIIxyXr70FZq0ot6fhIHFUmDCi+yTPp5Zig4cnny1MfKER3DjvYPEHviNOWzvGetm5k/ekRb46sPi7bts3BmzTCGmGqyXUYJSm0pM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773346856; c=relaxed/simple; bh=i63XSVI5a2C3jPzHPkXCTbwgYTXMRQdXZtI3C/Y3ayc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nkv0SERKtoPMEXtfxnYt9CeRJa1obDiDQybb6FieRGd8d+5c9qh87qRA3nECU2xWJEdeZVwU9utgm5CMCEu6SMiXfW8DUrAH2luAj7JWbzEr74CTKUjpU+qeYxb1I5/0HI62PUHNMnZ4sVXyKPh+V2go0dsp+VMZaFg4fbn/iBU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ik3jallZ; 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="Ik3jallZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5138C4CEF7; Thu, 12 Mar 2026 20:20:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773346856; bh=i63XSVI5a2C3jPzHPkXCTbwgYTXMRQdXZtI3C/Y3ayc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ik3jallZi/gEFDlJ5Wg1CdzDVaEVgV2feIVRbge0p0BuO93eqdUcqrh4lIPEGt6W7 Zu9jNa4ino0Idl+3lCBVQ8OxlZejJhiHBED8wVMAnhSIh9exOsVEf+MfzwQbGib5eo xh4hZq3ekxThsfIpcP/+wMw79UwJ8WEq6C/TbkYo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jun Seo , Takashi Iwai Subject: [PATCH 6.12 143/265] ALSA: usb-audio: Use correct version for UAC3 header validation Date: Thu, 12 Mar 2026 21:08:50 +0100 Message-ID: <20260312201023.422565115@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260312201018.128816016@linuxfoundation.org> References: <20260312201018.128816016@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 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jun Seo commit 54f9d645a5453d0bfece0c465d34aaf072ea99fa upstream. The entry of the validators table for UAC3 AC header descriptor is defined with the wrong protocol version UAC_VERSION_2, while it should have been UAC_VERSION_3. This results in the validator never matching for actual UAC3 devices (protocol == UAC_VERSION_3), causing their header descriptors to bypass validation entirely. A malicious USB device presenting a truncated UAC3 header could exploit this to cause out-of-bounds reads when the driver later accesses unvalidated descriptor fields. The bug was introduced in the same commit as the recently fixed UAC3 feature unit sub-type typo, and appears to be from the same copy-paste error when the UAC3 section was created from the UAC2 section. Fixes: 57f8770620e9 ("ALSA: usb-audio: More validations of descriptor units") Cc: Signed-off-by: Jun Seo Link: https://patch.msgid.link/20260226010820.36529-1-jun.seo.93@proton.me Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/usb/validate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/usb/validate.c +++ b/sound/usb/validate.c @@ -281,7 +281,7 @@ static const struct usb_desc_validator a /* UAC_VERSION_2, UAC2_SAMPLE_RATE_CONVERTER: not implemented yet */ /* UAC3 */ - FIXED(UAC_VERSION_2, UAC_HEADER, struct uac3_ac_header_descriptor), + FIXED(UAC_VERSION_3, UAC_HEADER, struct uac3_ac_header_descriptor), FIXED(UAC_VERSION_3, UAC_INPUT_TERMINAL, struct uac3_input_terminal_descriptor), FIXED(UAC_VERSION_3, UAC_OUTPUT_TERMINAL,