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.kerkm...@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-3d3a2c797...@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.kerkm...@pengutronix.de>


Reply via email to