Linux USB
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Haofeng Li <lihaofeng@kylinos.cn>,
	gregkh@linuxfoundation.org, xu.yang_2@nxp.com
Cc: hhhuuu@google.com, kees@kernel.org, kai.aizen.dev@gmail.com,
	andriy.shevchenko@intel.com, christophe.jaillet@wanadoo.fr,
	dan.scally@ideasonboard.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, 13266079573@163.com
Subject: Re: [PATCH] usb: gadget: f_uvc: fix Extension Unit descriptor heap overflow
Date: Sat, 22 Aug 2026 13:01:19 -0700	[thread overview]
Message-ID: <bccf64d8-d7f2-46e9-b3e2-5605decad9d6@infradead.org> (raw)
In-Reply-To: <20260822194705.4151650-1-lihaofeng@kylinos.cn>



On 8/22/26 12:47 PM, Haofeng Li wrote:
> +/* The descriptor must fit into the one-byte bLength field */

          descriptor length must fit
?

> +static int uvcg_extension_check_size(u8 nr_in_pins, u8 control_size)
> +{
> +	if (UVC_DT_EXTENSION_UNIT_SIZE(nr_in_pins, control_size) > 255)
> +		return -EINVAL;
> +
> +	return 0;
> +}

-- 
~Randy


  reply	other threads:[~2026-08-22 20:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-22 19:47 [PATCH] usb: gadget: f_uvc: fix Extension Unit descriptor heap overflow Haofeng Li
2026-08-22 20:01 ` Randy Dunlap [this message]
2026-08-22 20:26   ` Haofeng Li
2026-08-22 20:26 ` [PATCH v2] " Haofeng Li
2026-08-24  8:38 ` [PATCH] " Dan Scally
2026-08-24  9:44   ` [PATCH v3] " Haofeng Li
2026-08-24 15:29     ` Andy Shevchenko
2026-08-24 17:04     ` [PATCH v4] " Haofeng Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bccf64d8-d7f2-46e9-b3e2-5605decad9d6@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=13266079573@163.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dan.scally@ideasonboard.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hhhuuu@google.com \
    --cc=kai.aizen.dev@gmail.com \
    --cc=kees@kernel.org \
    --cc=lihaofeng@kylinos.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=xu.yang_2@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox