From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB2A3C433E0 for ; Wed, 1 Jul 2020 10:57:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8B43520702 for ; Wed, 1 Jul 2020 10:57:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593601058; bh=qAAic7vs2yVMNd1JQknrRGHfHt4gS1Aw4pbTIJlwvsU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=CpEEXFTB3Viu0x+D8ffgxKaeS7ggOAruOqObLWJIhDww6T7ODhYq9rRxSlC9tPP21 78W8d0Y/2Zd46zz85lljG2JC2adNWsaF/YJooQY9wO9vkpwsuoPnVvWBJ0w4F8EcAd G66h7HDojevktkA1/opWxeV28JvRgMRJ41E+Pj28= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730163AbgGAK5h (ORCPT ); Wed, 1 Jul 2020 06:57:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:55130 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729791AbgGAK53 (ORCPT ); Wed, 1 Jul 2020 06:57:29 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9D80C206CB; Wed, 1 Jul 2020 10:57:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593601048; bh=qAAic7vs2yVMNd1JQknrRGHfHt4gS1Aw4pbTIJlwvsU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=H7vQIgD/P/I08yV5G1Fpjot1JnoS83yrvzBZtKfCOQQnUNvod1VWTSWtVpmdeHUpx FXTKsbPpQcW+PbZS5swhQEWKyoxPHXGQRqPCyYjeozsxxaCbHMrJIH4w3dNaont+QG XZCYdJnPRmNr0okB3mW1z++RwCnHWyfTg+YvxNIM= Date: Wed, 1 Jul 2020 12:57:14 +0200 From: Greg Kroah-Hartman To: Pavel Machek Cc: Jesse Barnes , Rajat Jain , Rajat Jain , Bjorn Helgaas , "Raj, Ashok" , "Krishnakumar, Lalithambika" , Bjorn Helgaas , linux-pci , Mika Westerberg , Jean-Philippe Brucker , Prashant Malani , Benson Leung , Todd Broch , Alex Levin , Mattias Nissler , Zubin Mithra , Bernie Keany , Aaron Durbin , Diego Rivas , Duncan Laurie , Furquan Shaikh , Christian Kellner , Alex Williamson , Joerg Roedel , Linux Kernel Mailing List Subject: Re: [RFC] Restrict the untrusted devices, to bind to only a set of "whitelisted" drivers Message-ID: <20200701105714.GA2098169@kroah.com> References: <20200603121613.GA1488883@kroah.com> <20200605080229.GC2209311@kroah.com> <20200607113632.GA49147@kroah.com> <20200630214559.GA7113@duo.ucw.cz> <20200701065426.GC2044019@kroah.com> <20200701084750.GA7144@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200701084750.GA7144@amd> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 01, 2020 at 10:47:50AM +0200, Pavel Machek wrote: > Hi! > > > > We normally trust the hardware NOT to be malicious. (Because if hacker > > > has physical access to hardware and lot of resources, you lost). > > > > That is what we originally thought, however the world has changed and we > > need to be better about this, now that it is trivial to create a "bad" > > device. > > I'm not disagreeing. > > > > This is still true today, but maybe trusting USB devices is bad idea, > > > so drivers are being cleaned up. PCI drivers will be WORSE in this > > > regard. And you can't really protect against malicious CPU, and it is > > > very very hard to protect against malicous RAM (probably not practical > > > without explicit CPU support). > > > > > > Linux was designed with "don't let hackers near your hardware" threat > > > model in mind. > > > > Yes, it originally was designed that way, but again, the world has > > changed so we have to change with it. That is why USB has for a long > > time now, allowed you to not bind drivers to devices that you do not > > "trust", and that trust can be determined by userspace. That all came > > about thanks to the work done by the wireless USB spec people and kernel > > authors, which showed that maybe you just don't want to trust any device > > that comes within range of your system :) > > Again, not disagreeing; but note the scale here. > > It is mandatory to defend against malicious wireless USB devices. Turns out there are no more wireless USB devices in the world, and the code for that is gone from Linux :) > We probably should work on robustness against malicious USB devices. We are, and do have, that support today. > Malicious PCI-express devices are lot less of concern. Not really, they are a lot of concern to some people. Valid attacks are out there today, see the thunderbolt attacks that numerous people have done and published recently and for many years. > Defending against malicious CPU/RAM does not make much sense. That's what the spectre and rowhammer fixes have been for :) thanks, greg k-h