Home
last modified time | relevance | path

Searched hist:"0 bfe5e43" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/sound/usb/
H A Dmixer.c0bfe5e43 Wed Dec 19 07:04:47 CST 2018 Takashi Iwai <tiwai@suse.de> ALSA: usb-audio: Check mixer unit descriptors more strictly

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: Takashi Iwai <tiwai@suse.de>
0bfe5e43 Wed Dec 19 07:04:47 CST 2018 Takashi Iwai <tiwai@suse.de> ALSA: usb-audio: Check mixer unit descriptors more strictly

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: Takashi Iwai <tiwai@suse.de>