]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ALSA: usb-audio: Use correct version for UAC3 header validation
authorJun Seo <jun.seo.93@proton.me>
Thu, 26 Feb 2026 01:08:20 +0000 (10:08 +0900)
committerTakashi Iwai <tiwai@suse.de>
Thu, 26 Feb 2026 06:37:29 +0000 (07:37 +0100)
commit54f9d645a5453d0bfece0c465d34aaf072ea99fa
tree80d70b2dd5cdc94621a536086363ea3f28853fea
parentaa4876fe2d9fcbcaa0592b25f34ec6f6ea7876c1
ALSA: usb-audio: Use correct version for UAC3 header validation

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: <stable@vger.kernel.org>
Signed-off-by: Jun Seo <jun.seo.93@proton.me>
Link: https://patch.msgid.link/20260226010820.36529-1-jun.seo.93@proton.me
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/validate.c