From: Jordy <jordy@simplyhacker.com>
To: u-boot@lists.denx.de
Subject: Double free vulnerability in do_rename_gpt_parts
Date: Fri, 17 Jan 2020 07:03:09 -0500 (EST) [thread overview]
Message-ID: <1646688175.190878.1579262589951@privateemail.com> (raw)
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
next reply other threads:[~2020-01-17 12:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-17 12:03 Jordy [this message]
2020-01-17 15:29 ` Double free vulnerability in do_rename_gpt_parts Simon Goldschmidt
2020-01-17 16:31 ` Tom Rini
2020-01-17 16:42 ` Simon Goldschmidt
2020-01-17 17:23 ` Jordy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1646688175.190878.1579262589951@privateemail.com \
--to=jordy@simplyhacker.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox