Re: [PATCH] media: uvcvideo: reject descriptor walks that cannot advance

From: Shirong Zhao

Date: Thu Nov 19 2026 - 00:25:55 EST


Hi Ricardo,

Thanks for the review, and for pointing me at
usb_parse_configuration(). I had missed that the USB core already
validates bLength for every descriptor before the UVC parser ever sees
them, so the extra checks really are redundant. Dropping this one.

I agree that bounding uvc_parse_format()/uvc_parse_streaming()/
uvc_parse_frame() by the field size would be the more meaningful
change, but also that the result would not be as clean as
uvc_parse_control(). I'll leave that decision to you.

Regards,
Shirong