Re: [PATCH] ALSA: ua101: Reject too-short USB descriptors

From: Takashi Iwai

Date: Tue May 19 2026 - 02:09:17 EST


On Tue, 19 May 2026 05:32:15 +0200,
Cássio Gabriel wrote:
>
> find_format_descriptor() walks the class-specific interface extras by
> advancing with bLength. It rejects descriptors that extend past the
> remaining buffer, but it does not reject descriptor lengths smaller than
> a USB descriptor header.
>
> Reject too-short descriptors before using bLength to advance the local
> scan. This keeps the UA-101 parser robust against malformed descriptor
> data and matches the usual USB descriptor walking rules.
>
> Fixes: 63978ab3e3e9 ("sound: add Edirol UA-101 support")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@xxxxxxxxx>

Applied now. Thanks.


Takashi