]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: fix sync-ep altsetting sanity check
authorJohan Hovold <johan@kernel.org>
Tue, 14 Jan 2020 08:39:53 +0000 (09:39 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 14 Jan 2020 08:42:01 +0000 (09:42 +0100)
commit0b6e5996a513fadbab2c1c92dac0727daada82ec
tree7e1a10684bb3e62d4b0d8e77c11caf77e48080bd
parent9e04a75d786841b5c682030b8c0aca1c56d23de2
ALSA: usb-audio: fix sync-ep altsetting sanity check

The altsetting sanity check in set_sync_ep_implicit_fb_quirk() was
checking for there to be at least one altsetting but then went on to
access the second one, which may not exist.

This could lead to random slab data being used to initialise the sync
endpoint in snd_usb_add_endpoint().

Fixes: f7042a57bec5 ("ALSA: snd-usb: add support for implicit feedback")
Fixes: d9a9ed0e365c ("ALSA: usb-audio: FT C400 sync playback EP to capture EP")
Fixes: 7370645c4be5 ("ALSA: usb-audio: add implicit fb quirk for Behringer UFX1204")
Fixes: 003ee37d960c ("ALSA: usb-audio: add implicit fb quirk for Axe-Fx II")
Fixes: 3fc9b4937dd0 ("ALSA: usb-audio: simplify set_sync_ep_implicit_fb_quirk")
Cc: stable <stable@vger.kernel.org> # 3.5
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20200114083953.1106-1-johan@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/pcm.c