From: "Vincent Stehlé" <vincent.stehle@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] tools/proftool: fix use-after-free
Date: Wed, 7 Oct 2015 16:35:53 +0200 [thread overview]
Message-ID: <56152DC9.3060009@freescale.com> (raw)
In-Reply-To: <20151007141929.GO3829@bill-the-cat>
On 10/07/2015 04:19 PM, Tom Rini wrote:
..
> Were you in the Coverity talk too? :)
Hi Tom,
No, I was not following that talk, sorry.
..
> free(line);
> - return regex_report_error(&line->regex, err, "compile",
> + err = regex_report_error(&line->regex, err, "compile",
> tok);
> + return err;
I am not sure you solve the problem this way. Indeed the structure
pointed to by the line pointer will still have been freed before use
even this way. Who knows what the memory contains when regerror() will
access &line->regex, which is contained into the freed structure?
Best regards,
V.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151007/15a57976/attachment.sig>
next prev parent reply other threads:[~2015-10-07 14:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 13:48 [U-Boot] [PATCH] tools/proftool: fix use-after-free Vincent Stehlé
2015-10-07 14:19 ` Tom Rini
2015-10-07 14:35 ` Vincent Stehlé [this message]
2015-10-07 15:42 ` Tom Rini
2015-11-17 1:40 ` [U-Boot] " Tom Rini
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=56152DC9.3060009@freescale.com \
--to=vincent.stehle@freescale.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