Linux USB
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Yingjie Wang" <x-professor@outlook.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] usb: gadget: configfs: NUL-terminate extended property data
Date: Sat, 31 Oct 2026 18:29:02 +0000	[thread overview]
Message-ID: <sashiko-outbox-192091@kernel.org> (raw)
In-Reply-To: <7bb734dd2b0ef5f1ff7ffd9f1ffd8fd7b84e5073.1793470427.git.x-professor@outlook.com>

> Unicode extended properties include a UTF-16 terminator in their wire
> length.  The configfs store path keeps the raw UTF-8 bytes, but the
> configfs readback and descriptor conversion consume the source byte
> implied by that terminator-inclusive length.
> 
> The allocation currently contains only the input bytes, so both paths
> can read one byte past it.  Allocate the trailing NUL with kmemdup_nul()
> and centralize the raw-to-wire length conversion used by the store path.
> Avoid dereferencing page[-1] on an empty configfs write.
> 
> Fixes: 7419485f197c ("usb: gadget: configfs: OS Extended Properties descriptors support")
> Reported-by: Bingquan Chen <patzilla007@gmail.com>
> Link: https://lore.kernel.org/r/20260421141010.5607-1-patzilla007@gmail.com
> Suggested-by: Neill Kapron <nkapron@google.com>
> Link: https://lore.kernel.org/r/179338899796.2590875.15337207674245295434.b4-review@b4
> Cc: stable@vger.kernel.org
> Signed-off-by: Yingjie Wang <x-professor@outlook.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1793470427.git.x-professor@outlook.com?part=1


  reply	other threads:[~2026-10-31 18:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29  3:06 [PATCH] usb: gadget: configfs: NUL-terminate extended property data Yingjie Wang
2026-10-29  3:16 ` sashiko-bot
2026-10-30 19:36 ` Neill Kapron
2026-10-31 18:13   ` [PATCH v2 0/2] usb: gadget: configfs: fix extended property length handling Yingjie Wang
2026-10-31 18:13     ` [PATCH v2 1/2] usb: gadget: configfs: NUL-terminate extended property data Yingjie Wang
2026-10-31 18:29       ` sashiko-bot [this message]
2026-10-31 18:13     ` [PATCH v2 2/2] usb: gadget: configfs: keep extended property lengths consistent Yingjie Wang
2026-10-31 18:29       ` sashiko-bot

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=sashiko-outbox-192091@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=x-professor@outlook.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