From owner-freebsd-security@freebsd.org Thu Jan 4 20:43:04 2018 Return-Path: Delivered-To: freebsd-security@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 899F8EB5B70 for ; Thu, 4 Jan 2018 20:43:04 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.not-for.work (onlyone.not-for.work [148.251.9.81]) by mx1.freebsd.org (Postfix) with ESMTP id 52A9B804F7; Thu, 4 Jan 2018 20:43:04 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:e0f4:994:662:862]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.not-for.work (Postfix) with ESMTPSA id 7FC9D843; Thu, 4 Jan 2018 23:42:56 +0300 (MSK) Date: Thu, 4 Jan 2018 23:42:55 +0300 From: Lev Serebryakov Reply-To: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <1401022152.20180104234255@serebryakov.spb.ru> To: Julian Elischer , "freebsd-security@freebsd.org" Subject: Re: clang way to patch for Spectre? In-Reply-To: <43417734-d420-5be9-333b-8d0d02d7a58a@freebsd.org> References: <291645341.20180104190237@serebryakov.spb.ru> <43417734-d420-5be9-333b-8d0d02d7a58a@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 20:43:04 -0000 Hello Julian, Thursday, January 4, 2018, 8:49:50 PM, you wrote: >> https://reviews.llvm.org/D41723 >> >> > not really.. > What's to stop an unprivileged used bringing his own compiler? or a > precompiled binary? As far as I understand, Spectre can not cross boundaries, so precompiled binary will be able read its own memory via bug. To read all memory via Spectre (don't confuse it with Meltdown) code must be privileged. And this codegen patch eliminate "gadgets" in kernel which could be exploited by userland code. -- Best regards, Lev mailto:lev@FreeBSD.org