[PATCH] cmd: gpt: Fix freeing gpt_pte in gpt_verify()
Tom Rini
trini at konsulko.com
Fri Jun 28 21:49:30 CEST 2024
On Wed, 19 Jun 2024 16:23:30 -0500, Sam Protsenko wrote:
> In case when either gpt_verify_headers() or gpt_verify_partitions()
> fails, the memory allocated for gpt_pte will be freed in those functions
> internally, but gpt_pte will still contain non-NULL dangling pointer.
> The attempt to free it in those cases in gpt_verify() leads to "use
> after free" error, which leads to a "Synchronous abort" exception.
>
> This issue was found by running the next command on the device with
> incorrect partition table:
>
> [...]
Applied to u-boot/next, thanks!
--
Tom
More information about the U-Boot
mailing list