mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Stefan Kerkmann <s.kerkmann@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	 BAREBOX <barebox@lists.infradead.org>
Cc: Stefan Kerkmann <s.kerkmann@pengutronix.de>
Subject: [PATCH 0/2] of: fdt: fix memory leak and oob writes in fdt_ensure_space
Date: Wed, 31 Jan 2024 17:56:58 +0100	[thread overview]
Message-ID: <20240131-fix-fdt-memory-safety-v1-0-3d3a2c797eec@pengutronix.de> (raw)

I have encountered the oob write while attempting to modify a large FIT
image with of_property. While hunting for the root cause I noticed that
there is a potential memory leak in fdt_ensure_space as well. Both is
fixed in this series.

Signed-off-by: Stefan Kerkmann <s.kerkmann@pengutronix.de>
---
Stefan Kerkmann (2):
      of: fdt: fix memory leak in fdt_ensure_space
      of: fdt: fix oob writes with large ftd properties

 drivers/of/fdt.c | 31 ++++++++++++++++++++++++-------
 1 file changed, 24 insertions(+), 7 deletions(-)
---
base-commit: cecd3fbea3550532d2175bc13aa479a45e605da0
change-id: 20240131-fix-fdt-memory-safety-b06f9164d953

Best regards,
-- 
Stefan Kerkmann <s.kerkmann@pengutronix.de>




             reply	other threads:[~2024-01-31 16:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 16:56 Stefan Kerkmann [this message]
2024-01-31 16:56 ` [PATCH 1/2] of: fdt: fix memory leak " Stefan Kerkmann
2024-01-31 17:15   ` Ahmad Fatoum
2024-02-01  8:34     ` Stefan Kerkmann
2024-01-31 16:57 ` [PATCH 2/2] of: fdt: fix oob writes with large ftd properties Stefan Kerkmann
2024-01-31 17:21   ` Ahmad Fatoum
2024-02-01 10:24     ` Stefan Kerkmann
2024-02-01 10:42       ` Ahmad Fatoum
2024-02-01  7:47   ` Sascha Hauer
2024-02-01  8:49     ` Stefan Kerkmann

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=20240131-fix-fdt-memory-safety-v1-0-3d3a2c797eec@pengutronix.de \
    --to=s.kerkmann@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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