Devicetree
 help / color / mirror / Atom feed
From: Sang-Heon Jeon <ekffu200098@gmail.com>
To: robh@kernel.org, saravanak@kernel.org
Cc: devicetree@vger.kernel.org, Sang-Heon Jeon <ekffu200098@gmail.com>
Subject: [PATCH v2 0/2] of: reserved_mem: fix OOB write and name skipped nodes
Date: Sun, 14 Jun 2026 22:38:05 +0900	[thread overview]
Message-ID: <20260614133807.2165124-1-ekffu200098@gmail.com> (raw)

Patch 1 fixes an out-of-bounds write in fdt_scan_reserved_mem(). When
more than MAX_RESERVED_REGIONS dynamically-placed regions are defined,
it writes past the end of the local array.

Patch 2 names the skipped node in fdt_init_reserved_mem_node(), the other
place that drops regions.

Changes from v1 [1]
- fix bounds check to cover the missed case in v1, based on sashiko
  review
- print skipped no name error message in fdt_scan_reserved_mem() and
  fdt_init_reserved_mem_node() both.

[1] https://lore.kernel.org/all/20260603152709.941788-1-ekffu200098@gmail.com/

Sang-Heon Jeon (2):
  of: reserved_mem: prevent OOB when too many dynamic regions are
    defined
  of: reserved_mem: print skipped node name when too many regions are
    defined

 drivers/of/of_reserved_mem.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

-- 
2.43.0


             reply	other threads:[~2026-06-14 13:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-14 13:38 Sang-Heon Jeon [this message]
2026-06-14 13:38 ` [PATCH v2 1/2] of: reserved_mem: prevent OOB when too many dynamic regions are defined Sang-Heon Jeon
2026-06-14 13:47   ` sashiko-bot
2026-06-14 13:38 ` [PATCH v2 2/2] of: reserved_mem: print skipped node name when too many " Sang-Heon Jeon
2026-06-14 13:50   ` sashiko-bot
2026-06-14 14:46     ` Sang-Heon Jeon

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=20260614133807.2165124-1-ekffu200098@gmail.com \
    --to=ekffu200098@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --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