Linux USB
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Niklas Neronin <niklas.neronin@linux.intel.com>,
	linux-usb@vger.kernel.org, stern@rowland.harvard.edu,
	gregkh@linuxfoundation.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH] usb: config: fix iteration issue in 'usb_get_bos_descriptor()'
Date: Fri, 17 Nov 2023 15:50:50 +0200	[thread overview]
Message-ID: <c77909fd-18d3-4d5f-834c-a696e2abc9c8@linux.intel.com> (raw)
In-Reply-To: <20231115121325.471454-1-niklas.neronin@linux.intel.com>

On 15.11.2023 14.13, Niklas Neronin wrote:
> The BOS descriptor defines a root descriptor and is the base descriptor for
> accessing a family of related descriptors.
> 
> Function 'usb_get_bos_descriptor()' encounters an iteration issue when
> skipping the 'USB_DT_DEVICE_CAPABILITY' descriptor type. This results in
> the same descriptor being read repeatedly.
> 
> To address this issue, a 'goto' statement is introduced to ensure that the
> pointer and the amount read is updated correctly. This ensures that the
> function iterates to the next descriptor instead of reading the same
> descriptor repeatedly.
> 
> Cc: stable@vger.kernel.org
> Fixes: 3dd550a2d365 ("USB: usbcore: Fix slab-out-of-bounds bug during device reset")
> Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com>
> ---

Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>



  reply	other threads:[~2023-11-17 13:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-15 12:13 [PATCH] usb: config: fix iteration issue in 'usb_get_bos_descriptor()' Niklas Neronin
2023-11-17 13:50 ` Mathias Nyman [this message]
2023-11-17 15:50 ` Alan Stern

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=c77909fd-18d3-4d5f-834c-a696e2abc9c8@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=niklas.neronin@linux.intel.com \
    --cc=stable@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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