Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2315136ima; Mon, 22 Oct 2018 07:50:37 -0700 (PDT) X-Google-Smtp-Source: ACcGV63T1P4nyqq27+SlqjitDqSCRWzNp1ilfm4mIOz1UIyaPe2F3bRdcte6d6Fm+PR5ljIaClaq X-Received: by 2002:a63:6a42:: with SMTP id f63-v6mr44206818pgc.48.1540219837560; Mon, 22 Oct 2018 07:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540219837; cv=none; d=google.com; s=arc-20160816; b=bhWs4oZWbfAESvUKVKaFU/GmdrnnufhXnJQ+BzCBdi//mTzZGuCLvqB7V2xCntNYKV ArJERA+Pq9EAxY5nT7L3aPUoKwRREiXCqBEqnFooDoG0Kcvg/j+5qj3KZCXMtLK4m+/A 1gInYpRJrB19KVUbp8DDGyE/u/eqEGciLo3i/Cf62aQHONZWEp0jW4W67dhRg7kO/PZp NUz/1Dvjkh4Ye8dLY2AZcLH/F7iuDEiKeLYp39byuZspO3dGoteQdPXyfsGl7DtmO+vr zBsX0i4KxBRvxhQ59KpFZl4kP+kmYxAZM2DPeT263XxCs7G+lr1xMpCU7UdLslVdFl8d JKkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Ww/dD/B0Z9dP/5NwASiVzKD70b57AqQPaBmiKOoxQ/A=; b=WtTWbRDfVvu3U0h6PNKWfOAJgRCP08y0Fnwdio5FYnfYsu2o/68LLlf8vfAOkIbBcX eiZZwlOJKGsefZUE27XXKoL0F9UogkNv6et4ouGNPGhim5A3OduVZ2vvs0ZBhdcuf2vD 8zkYEUqrMHH53yi+0y7mX6m0rylhas8KfmmcCiyqJcpbp7ZUctkdmvR09bcQjT+LAUyH cHEq5o38Psj9H+GLc4aV1TRkokAeO4Xyosv0BZSg9uXqXsVsy2kbSfWrexX6xJeZ6/l+ akBFMB/SKNPdvdZgA3Jk+1SAQkTsMQECd9WL/9DQeJA382d/2OMsQsKokQIs+PpHZDPt C2UA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y124-v6si3465013pgy.363.2018.10.22.07.50.22; Mon, 22 Oct 2018 07:50:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728505AbeJVWdr (ORCPT + 99 others); Mon, 22 Oct 2018 18:33:47 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:39179 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728375AbeJVWdr (ORCPT ); Mon, 22 Oct 2018 18:33:47 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 766A98078E; Mon, 22 Oct 2018 16:14:58 +0200 (CEST) Date: Mon, 22 Oct 2018 16:14:59 +0200 From: Pavel Machek To: "Gustavo A. R. Silva" Cc: Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Input: uinput - fix Spectre v1 vulnerability Message-ID: <20181022141458.GA29727@amd> References: <20181016111313.GA28307@embeddedor.com> <20181016172107.GA230131@dtor-ws> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue 2018-10-16 19:52:58, Gustavo A. R. Silva wrote: > Hi Dmitry, >=20 > On 10/16/18 7:21 PM, Dmitry Torokhov wrote: > > Hi Gustavo, > >=20 > > On Tue, Oct 16, 2018 at 01:13:13PM +0200, Gustavo A. R. Silva wrote: > >> setup.code can be indirectly controlled by user-space, hence leading to > >> a potential exploitation of the Spectre variant 1 vulnerability. > >> > >> This issue was detected with the help of Smatch: > >> > >> drivers/input/misc/uinput.c:512 uinput_abs_setup() warn: potential > >> spectre issue 'dev->absinfo' [w] (local cap) > >> > >> Fix this by sanitizing setup.code before using it to index dev->absinf= o. > >=20 > > So we are saying that attacker, by repeatedly calling ioctl(..., > > UI_ABS_SETUP, ...) will be able to poison branch predictor and discover > > another program or kernel secrets? But uinput is a privileged interface > > open to root only, as it allows injecting arbitrary keystrokes into the > > kernel. And since only root can use uinput, meh? > >=20 >=20 > Oh I see... in that case this is a false positive. No, please lets fix it. Some people are trying to make sure kernel is "more priviledged" than root -- its called secure boot etc. And "if you givean attacker possibility to generate keystrokes, he can read kernel memory as well"... is very unexpected. Unexpected is bad when talking about security. Pavel =09 --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlvN22IACgkQMOfwapXb+vJ1xACgkmaCK/eqBI2FyKOW4ixQxGGK 9sYAoJcEKV2/6EU79TFPSfLv9m06gnaV =lcj5 -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU--