Commit ec1aa324 authored by Takashi Iwai's avatar Takashi Iwai Committed by Zheng Zengkai
Browse files

ALSA: usb-audio: Validate MS endpoint descriptors



stable inclusion
from stable-5.10.40
commit e5ffa75afb5bda172508deb47866127b0cf90cbf
bugzilla: 51882
CVE: NA

--------------------------------

commit e84749a7 upstream.

snd_usbmidi_get_ms_info() may access beyond the border when a
malformed descriptor is passed.  This patch adds the sanity checks of
the given MS endpoint descriptors, and skips invalid ones.

Reported-by: default avatar <syzbot+6bb23a5d5548b93c94aa@syzkaller.appspotmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210510150659.17710-1-tiwai@suse.de


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent fff82fd0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment