From: Florian Weimer <fweimer@redhat.com>
To: Paul Eggert <eggert@cs.ucla.edu>, Zack Weinberg <zackw@panix.com>
Cc: GNU C Library <libc-alpha@sourceware.org>,
"Carlos O'Donell" <carlos@redhat.com>
Subject: Re: [PATCH 0/3] explicit_bzero v5
Date: Tue, 15 Nov 2016 18:42:00 -0000 [thread overview]
Message-ID: <388972da-c60c-6314-b39d-db5fc818fdb8@redhat.com> (raw)
In-Reply-To: <03bf455b-7dc9-663b-a748-8f1da9cfcfd3@cs.ucla.edu>
On 11/15/2016 07:02 PM, Paul Eggert wrote:
> On 11/15/2016 09:46 AM, Zack Weinberg wrote:
>
>> in any scenario where the arguments to explicit_bzero are visible to
>> malicious code, the adversary has already won. Those arguments, after
>> all, are either in registers or on the stack. If the adversary can
>> read either of those, they can already learn return addresses.
>
>
> It's possible that the adversary can read the stack but not registers,
> that the object address is already in a register but not in the stack,
> and that the call to explicit_bzero copies the address to the stack,
> making the address visible to the attacker. Perhaps something like the
> following instead?
>
> @strong{Warning:} Calling @code{explicit_bzero} may copy the
> the object's address from a register to the stack, thereby exposing
> the address to other parts of the program (e.g., another thread),
> which may defeat address space layout randomization.
I'm concerned that developers will read all these warnings and use
memset instead (or a hand-written loop) because this appears to avoid
all these issues.
Florian
next prev parent reply other threads:[~2016-11-15 18:42 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-15 15:55 Zack Weinberg
2016-11-15 15:55 ` [PATCH 1/3] New string function explicit_bzero (from OpenBSD) Zack Weinberg
2016-11-15 15:55 ` [PATCH 2/3] Add fortification and inline optimization of explicit_bzero Zack Weinberg
2016-11-15 15:55 ` [PATCH 3/3] Use explicit_bzero where appropriate Zack Weinberg
2016-11-16 18:38 ` [PATCH 1/3] New string function explicit_bzero (from OpenBSD) Michael Kerrisk (man-pages)
2016-11-15 16:20 ` [PATCH 0/3] explicit_bzero v5 Paul Eggert
2016-11-15 17:46 ` Zack Weinberg
2016-11-15 18:02 ` Paul Eggert
2016-11-15 18:42 ` Florian Weimer [this message]
2016-11-15 18:54 ` Zack Weinberg
2016-11-15 19:35 ` Paul Eggert
2016-11-16 14:56 ` Zack Weinberg
2016-11-16 21:38 ` Paul Eggert
2016-11-16 18:34 ` Michael Kerrisk (man-pages)
2016-11-15 19:35 ` Paul Eggert
2016-11-16 14:58 ` Zack Weinberg
2016-11-15 21:12 ` Richard Henderson
2016-11-16 14:45 ` Zack Weinberg
2016-11-16 14:58 ` Andreas Schwab
2016-11-16 15:00 ` Zack Weinberg
2016-11-16 15:09 ` Andreas Schwab
2016-11-16 15:14 ` Zack Weinberg
2016-11-16 15:22 ` Andreas Schwab
2016-11-16 20:06 ` Richard Henderson
2016-11-16 2:03 ` Joseph Myers
2016-11-16 15:06 ` Zack Weinberg
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=388972da-c60c-6314-b39d-db5fc818fdb8@redhat.com \
--to=fweimer@redhat.com \
--cc=carlos@redhat.com \
--cc=eggert@cs.ucla.edu \
--cc=libc-alpha@sourceware.org \
--cc=zackw@panix.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).