public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rob Herring (Arm)" <robh@kernel.org>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: devicetree@vger.kernel.org,
	Saravana Kannan <saravanak@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/of: fdt: validate stdout-path properties before parsing them
Date: Mon, 13 Apr 2026 11:58:20 -0500	[thread overview]
Message-ID: <177609949656.2989431.4492579275535229124.robh@kernel.org> (raw)
In-Reply-To: <20260403143001.1-dt-fdt-stdout-pengpeng@iscas.ac.cn>


On Fri, 03 Apr 2026 11:55:29 +0800, Pengpeng Hou wrote:
> early_init_dt_scan_chosen_stdout() fetches stdout-path and
> linux,stdout-path directly from the flat DT and immediately passes the
> result to strchrnul(). Flat DT properties are raw firmware-supplied
> byte sequences, and this path does not prove that either property is
> NUL-terminated within its declared bounds.
> 
> Use fdt_stringlist_get() so malformed unterminated stdout-path
> properties are rejected before the local parser walks them as C
> strings.
> 
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
> ---
>  drivers/of/fdt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Applied, thanks!


      reply	other threads:[~2026-04-13 16:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-03  3:55 [PATCH] drivers/of: fdt: validate stdout-path properties before parsing them Pengpeng Hou
2026-04-13 16:58 ` Rob Herring (Arm) [this message]

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=177609949656.2989431.4492579275535229124.robh@kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pengpeng@iscas.ac.cn \
    --cc=saravanak@kernel.org \
    /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