On Fri, 10 Jul 2026 15:33:38 +0000, Aristo Chen wrote:

> fit_import_data() in tools/fit_image.c declares the data pointer and
> the name of the external data property outside its loop over the
> /images subnodes, so both values leak from one image into the next. An
> image node that carries data-size but neither data-offset nor
> data-position then reuses the pointer left behind by the previously
> imported image: the previous image's data is written into the node,
> after which the import aborts trying to delete an external data
> property the node never had. Since that abort path only prints a
> debug() message, a regular mkimage build fails with nothing but the
> generic usage text. The failure mode also depends on the order of the
> image nodes: when no externally stored image precedes the malformed
> node, the pointer is still NULL, the node is skipped, and the hashing
> stage reports a proper error instead.
> 
> [...]

Applied to u-boot/main, thanks!

[1/2] tools: mkimage: fix stale data pointer in fit_import_data()
      commit: eecc4148fe61a53fa1f4d16ffb453c3901fc704f
[2/2] test: py: add regression test for fit_import_data() stale state
      commit: 7551ce097779014405bd4976e0f9f1246dbb80d7
-- 
Tom


Reply via email to