All of lore.kernel.org
 help / color / mirror / Atom feed
* Double free vulnerability in do_rename_gpt_parts
@ 2020-01-17 12:03 Jordy
  2020-01-17 15:29 ` Simon Goldschmidt
  0 siblings, 1 reply; 5+ messages in thread
From: Jordy @ 2020-01-17 12:03 UTC (permalink / raw)
  To: u-boot

Hello U-Boot lists!

I think I found a double free bug in U-Boot, in /cmp/gpt.c in the function do_rename_gpt_parts().

On line 702 the partition_list is being free'd if ret is smaller than 0.
If the return value is not -ENOMEM it will go to the out: label and free the partition_list again.

Double freeing may result in a write-what-where condition, allowing an attacker to execute arbitrary code.

My advice would be to not free the parition_list on line 702 as nothing is being done with it there afterwards anyway and leave your clean_up in the out: label :)

Kind Regards,

Jordy Zomer

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

end of thread, other threads:[~2020-01-17 17:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-17 12:03 Double free vulnerability in do_rename_gpt_parts Jordy
2020-01-17 15:29 ` Simon Goldschmidt
2020-01-17 16:31   ` Tom Rini
2020-01-17 16:42     ` Simon Goldschmidt
2020-01-17 17:23     ` Jordy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.