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 1fC9BT-0007db-8O for speck@linutronix.de; Fri, 27 Apr 2018 21:37:31 +0200 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 30B55406C75A for ; Fri, 27 Apr 2018 19:37:25 +0000 (UTC) Received: from washington.bos.jonmasters.org (ovpn-120-37.rdu2.redhat.com [10.10.120.37]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0EEC6AB3FE for ; Fri, 27 Apr 2018 19:37:23 +0000 (UTC) Subject: [MODERATED] Re: [PATCH v2] Linux Patch 1/1 References: <92c45587-5eb3-2421-6fc1-42e74a715e30@linux.intel.com> <20180427164743.GA14180@pd.tnic> <6e2b14fc-3bf6-071d-6ce2-e518f2c4f069@redhat.com> <20180427173221.GB14180@pd.tnic> <20180427180944.GD75137@tassilo.jf.intel.com> From: Jon Masters Message-ID: <2de93c45-9bcc-136d-3534-03d05bd6b660@redhat.com> Date: Fri, 27 Apr 2018 15:37:22 -0400 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="UvBDknevymCHeuvLzeJQJiofa3WpFXxFF"; protected-headers="v1" To: speck@linutronix.de List-ID: This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) --UvBDknevymCHeuvLzeJQJiofa3WpFXxFF Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 04/27/2018 02:53 PM, speck for Linus Torvalds wrote: >=20 >=20 > On Fri, 27 Apr 2018, speck for Thomas Gleixner wrote: >=20 >> On Fri, 27 Apr 2018, speck for Linus Torvalds wrote: >=20 >>> Basically, for the store buffer bypass, the *only* worry is JIT'ed co= de.=20 >>> I don't think people expect it to leak from supervisor to user mode, = for=20 >>> example, so it's not primarily a protection domain issue. >> >> Fair enough. I didn't look at it that way. Thanks for the clarificatio= n. >=20 > NOTE! My reading of the worry people have about the store buffer bypass= =20 > attack may simply be wrong. So somebody should verify this part. The concern we have is about managed code, yeah. I didn't want to fight too hard on the unset part if we get the set bit :) but there shouldn't be a security issue to having the prctl go both ways (and that would be ideal IMO). It's really about a sandboxed JavaScript or Java process (or somesuch similar like thing) in which that JIT is not expecting the potential for code to abuse this bypass to dump memory from the process containing it. e.g. in JavaScript you can make a memory dumping widget in about three lines of code that runs speculatively for that process. > Because if the store buffer bypass is actually seen as a security issue= on=20 > its own, then your argument that people shouldn't be able to turn the=20 > mitigation off is obviously very valid. It /might/ be an issue for the kernel stack. This is the fear many of us have. However, we do an lfence on entry to the kernel, so it would only be a problem there if we can find vulnerable syscall functions, and we haven't yet found any that contain suitable gadgets. That seems contrived, but it's the reason for the original kernel entry/exit frob. Jon. --=20 Computer Architect | Sent from my Fedora powered laptop --UvBDknevymCHeuvLzeJQJiofa3WpFXxFF--