mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 0/2] of: fdt: fix memory leak and oob writes in fdt_ensure_space
@ 2024-02-01 11:28 Stefan Kerkmann
  2024-02-01 11:28 ` [PATCH v2 1/2] of: fdt: fix memory leak " Stefan Kerkmann
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Kerkmann @ 2024-02-01 11:28 UTC (permalink / raw)
  To: Sascha Hauer, BAREBOX; +Cc: Stefan Kerkmann, Ahmad Fatoum

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>
---
Changes in v2:
- Review feedback from Ahmad and Sascha
- Link to v1: https://lore.kernel.org/r/20240131-fix-fdt-memory-safety-v1-0-3d3a2c797eec@pengutronix.de

---
Stefan Kerkmann (2):
      of: fdt: fix memory leak in fdt_ensure_space
      of: fdt: fix oob writes with large fdt properties

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

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




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-01 15:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-01 11:28 [PATCH v2 0/2] of: fdt: fix memory leak and oob writes in fdt_ensure_space Stefan Kerkmann
2024-02-01 11:28 ` [PATCH v2 1/2] of: fdt: fix memory leak " Stefan Kerkmann
2024-02-01 11:28 ` [PATCH v2 2/2] of: fdt: fix oob writes with large fdt properties Stefan Kerkmann
2024-02-01 15:10 ` [PATCH v2 0/2] of: fdt: fix memory leak and oob writes in fdt_ensure_space Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox