From: Rich Freeman <rich0@gentoo.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: gcc 7.3 + kernel 4.15 = spectre_v2 fixed
Date: Tue, 30 Jan 2018 16:43:50 -0500 [thread overview]
Message-ID: <CAGfcS_k6mKZ3Qu6s_FEyWmKoL+bUnn45PR27-cTg_bBo080MSQ@mail.gmail.com> (raw)
In-Reply-To: <p4osh9$5hn$1@blaine.gmane.org>
On Mon, Jan 29, 2018 at 11:35 PM, Nikos Chantziaras <realnc@gmail.com> wrote:
> On 30/01/18 00:36, Henry Kohli wrote:
>>
>> Would it be usefull to do a emerge -e @world with the new GCC 7.3 ?
>
> These flags are for *affected* applications only. That means application
> that: a) run third-party code, and b) do so in a sandbox.
While I agree that it doesn't make sense to go rebuilding everything
right now, I did want to caution that Spectre is probably a bit
wider-reaching than you're suggesting.
The sandboxed code issue is actually more of a problem with meltdown
as it doesn't require vulnerable interfaces to work - but meltdown has
nothing to do with gcc 7.3. Meltdown does not require any process
vulnerability to work - it just requires a vulnerable CPU and data
mapped into virtual address space that shouldn't be accessible.
Spectre is more about having vulnerable functions in your code being
executable by untrusted code, acting on untrusted data. Now, a lot of
sandboxes do have APIs in them that would be vulnerable, but the
problem goes beyond this. Any kind of API/IPC mechanism, including
sockets, could potentially be exploitable, as long as it is
interacting with some kind of local process (perhaps indirectly).
Spectre is about using data to trick a process to leak state via the
side channel of the cache, and then using local code to probe the
cache.
If you had some program that listened on a socket and accepted a
length and a string and then did a bounds check using the length, it
might be exploitable if a local process could feed it data. Even if
the process only listened for outside connections it might be
vulnerable if a local process colluded with a remote host to make that
connection.
Now, the more directly coupled the untrusted process is to the
vulnerable one the easier this would probably be to pull off. This is
why the kernel system call interface is so attractive. That, and also
the fact that kernel memory is of course a high-value target.
How exploitable any particular process is depends a lot on the actual
code/etc. Spectre should be seen as a class of vulnerabilities just
like buffer overflows. Not every call to strcpy is vulnerable to a
buffer overflow, but it is certainly an opportunity for one. Well, in
the same way things like bounds checks or indirect calls that are
associated with untrusted input are also opportunities. I imagine
that other classes of Spectre will emerge over the coming years as
well. To some degree compilers might be able to become smart enough
on their own to detect vulnerable code and add protections. The
question is whether that can be done with little overhead, vs having
developers identify these points and mark them for the compiler (which
I think is the current approach).
Disclaimer: I'm definitely not a major authority in Spectre. However,
the attack should not be considered limited to sandboxes and JIT and
such.
--
Rich
next prev parent reply other threads:[~2018-01-30 21:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-29 9:11 [gentoo-user] gcc 7.3 + kernel 4.15 = spectre_v2 fixed Adam Carter
2018-01-29 17:50 ` [gentoo-user] " Ian Zimmerman
2018-01-29 18:35 ` Alexander Kapshuk
2018-01-30 21:20 ` Ian Zimmerman
2018-01-29 18:35 ` Mike Gilbert
2018-01-29 18:56 ` Mick
2018-01-29 19:32 ` Mike Gilbert
2018-01-29 22:36 ` [gentoo-user] " Henry Kohli
2018-01-30 4:35 ` [gentoo-user] " Nikos Chantziaras
2018-01-30 21:43 ` Rich Freeman [this message]
2018-01-31 9:16 ` Nikos Chantziaras
2018-01-31 9:48 ` Taiidan
2018-01-31 10:22 ` Nikos Chantziaras
2018-01-31 11:30 ` Martin Vaeth
2018-01-31 12:04 ` Mick
2018-01-31 12:20 ` Nikos Chantziaras
2018-01-31 12:38 ` Mick
2018-02-02 11:19 ` Mick
2018-02-03 8:14 ` Nikos Chantziaras
2018-01-31 11:17 ` Martin Vaeth
2018-01-31 12:07 ` Nikos Chantziaras
2018-01-31 13:23 ` Martin Vaeth
2018-01-31 14:34 ` Rich Freeman
2018-01-31 14:24 ` Rich Freeman
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=CAGfcS_k6mKZ3Qu6s_FEyWmKoL+bUnn45PR27-cTg_bBo080MSQ@mail.gmail.com \
--to=rich0@gentoo.org \
--cc=gentoo-user@lists.gentoo.org \
/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