]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
ALSA: usb-audio: Fix incorrect size check for processing/extension units
authorTakashi Iwai <tiwai@suse.de>
Thu, 14 Nov 2019 16:56:12 +0000 (17:56 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 4 Dec 2019 09:29:26 +0000 (10:29 +0100)
commit695ba673133abadfe7914335fd37e55600062997
tree4ff70d65ce9f3b74ff0e7199021dcf2cb310a898
parentd872e35c0ba8adf5e935574aa310653e5b556fc6
ALSA: usb-audio: Fix incorrect size check for processing/extension units

BugLink: https://bugs.launchpad.net/bugs/1853475
commit 976a68f06b2ea49e2ab67a5f84919a8b105db8be upstream.

The recently introduced unit descriptor validation had some bug for
processing and extension units, it counts a bControlSize byte twice so
it expected a bigger size than it should have been.  This seems
resulting in a probe error on a few devices.

Fix the calculation for proper checks of PU and EU.

Fixes: 57f8770620e9 ("ALSA: usb-audio: More validations of descriptor units")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191114165613.7422-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
sound/usb/validate.c