• Takashi Iwai's avatar
    ALSA: usb-audio: Check mixer unit descriptors more strictly · cd5564f4
    Takashi Iwai authored
    commit 0bfe5e43 upstream.
    
    We've had some sanity checks of the mixer unit descriptors but they
    are too loose and some corner cases are overlooked.  Add more strict
    checks in uac_mixer_unit_get_channels() for avoiding possible OOB
    accesses by malformed descriptors.
    
    This also changes the semantics of uac_mixer_unit_get_channels()
    slightly.  Now it returns zero for the cases where the descriptor
    lacks of bmControls instead of -EINVAL.  Then the caller side skips
    the mixer creation for such unit while it keeps parsing it.
    This corresponds to the case like Maya44.
    
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    cd5564f4
Name
Last commit
Last update
Documentation Loading commit data...
LICENSES Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.clang-format Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...