Return-Path: Received: from mx3-rdu2.redhat.com ([66.187.233.73] helo=mx1.redhat.com) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fQHcX-0001qo-7r for speck@linutronix.de; Tue, 05 Jun 2018 21:27:53 +0200 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 53DA981ACAE0 for ; Tue, 5 Jun 2018 19:27:46 +0000 (UTC) Received: from washington.bos.jonmasters.org (ovpn-122-93.rdu2.redhat.com [10.10.122.93]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 24558111AF1B for ; Tue, 5 Jun 2018 19:27:46 +0000 (UTC) Subject: [MODERATED] Re: ARCH_CAPABILITIES note References: <0eca849b-fd6b-e42f-6c83-3c930d644bba@redhat.com> <3b6d8d03-945e-4efc-7baa-a7ecedfd2366@linux.intel.com> <51a5e275-67c2-5638-21e9-a3992ba1de0b@redhat.com> From: Jon Masters Message-ID: Date: Tue, 5 Jun 2018 15:27:45 -0400 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="ey8hedBmDLDjUWghbZE7bTk6Z5vMV3ksE"; protected-headers="v1" To: speck@linutronix.de List-ID: This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) --ey8hedBmDLDjUWghbZE7bTk6Z5vMV3ksE Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 06/05/2018 03:19 PM, speck for Thomas Gleixner wrote: > On Tue, 5 Jun 2018, speck for Jon Masters wrote: >> On 06/05/2018 02:27 PM, speck for Dave Hansen wrote: >>> On 06/05/2018 09:41 AM, speck for Jon Masters wrote: >>>> One topic I can't touch on here, but another is the SSBD. So for v4,= >>>> we're currently (probably) safe (enough?) against kernel stack explo= it >>>> by virtue of the serializing lfence in the retpoline entry code. BUT= if >>>> future silicon says "hey, I'm fine" and we disable the retpoline >>>> mitigation, we'll /still/ need to do the lfence on kernel entry. >>> >>> Totally agree that we need to be really careful about mitigations tha= t >>> interact between the variants. But, I have a bunch of questions. >> >> :) >> >>> Just to be clear: you are talking about the *syscall* entry path, and= >>> the retpoline on the indirect call to the syscall table entry, right?= >> >> Yup >=20 > And how is that supposed to protect anything? >=20 > The attack happens further down the syscall and the store target can be= > anything: kernel stack, function pointers or just a variable. If the lo= ad > gadget gets speculated on any of those, you lost. Agree. > Te LFENCE in the entry code is not protecting any of these, except a > straight return to user space speculation. Right. My earlier concern was simply the trampoline entry code saving userspace registers onto the stack, etc. As I said, a lot more work needs doing on the syscall handlers to understand what should be done. It's not just out of bounds checks, it's also anywhere you might be able to do a stack attack where some user controlled value is stored to the stack then some other safe value is stored, followed by a second load. >> Ronak, Asit, and the core team folks. I'll forward you a mail that >> mentions this and another attack vector also currently coincidentally >> fixed by the retpoline code, but not being tracked. I'm not at liberty= >> to (yet) share the details of that other attack here but Intel know. >=20 > Has the next secrecy foofaraw started or did I miss that the previous o= ne > never ended? There are a few vulnerability reports I'm aware of which I don't own. They're not Intel controlled, and we've asked that these be shared. The one that's relevant to this thread is one we can hopefully discuss soon, but happens to be mitigated by the existing Spectre-v2 fixes in Linux. Jon. --=20 Computer Architect | Sent from my Fedora powered laptop --ey8hedBmDLDjUWghbZE7bTk6Z5vMV3ksE--