Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp736906ybb; Thu, 28 Mar 2019 11:09:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4xAsY6HawnyeNVEWxCp/iRpvnWLpecjFcGJ1+qPzj2Wx7BGH/NvcREfpY9c1LxLaKJF/y X-Received: by 2002:a65:60c1:: with SMTP id r1mr41104730pgv.137.1553796548775; Thu, 28 Mar 2019 11:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553796548; cv=none; d=google.com; s=arc-20160816; b=h2YMMkEevOPAQjoYl/7ly6fwrai+x4dN1H1SwqUwx6VieoCkkq1nrKWHv98hlG9FYm RP+JYIXbAOU/By9EJtcYlNMl+81QDvhDHDmfoCJnlvexXy/ytY23g17Y8CVajLrtiR9z ztNei9gn7crZ1ZubKl5yHrZXeaioi/lXpD5Ap2Rlxemvg0JajwZ2Bht2XAhLIQ2C7/G1 Z7zMZ7Gex78vwxe7ryNylbMc81ycndNvgQPf4It1lJcooQK0e/xIsHHWtWT7fF0ozKEy P/M0GttVAkguemg5wLH4JPGWTo2G75EQc4uJxFxPJuSUm1e0YfpNDlFelQS2Umf8oMek ZmDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=mhh689jASFqwg5CvKSsCVL3z97Hnu8T15rPfSQcYnLE=; b=ZlON4N6XgiADWYkdwshyySAY26wO1T+W2gkdI37IeDrI2yyFq4sEoJS/loFqGmMzxI jMiHHwYWI6NHJ5wz9z8USgJ7qV/yulbu4YT087podB7FU+NZUMYVW0ylbtk5+N8xo3Zf Nc7JSHQqXIfLkRa+iPvu/4kfBS9PGKNxIn6aFiqgPkrDVqvJvUGMOqh/R5Bl/6tlPo3h wtqJPAcf8QwOp0wDanMeCtmjVvMKRSrCWFQj71OZmAJC4VZatgBpOpfgpgLOMeK0MAsX Y8vZKHIbxuN+cXxIBfNy51GPHrPbRHszp6HjYIMFiOsTEVl84DJgwm+Ie/Nd8IfxxaME cGlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=NzaIE6ux; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s21si12098156pfh.260.2019.03.28.11.08.52; Thu, 28 Mar 2019 11:09:08 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=NzaIE6ux; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727072AbfC1SIM (ORCPT + 99 others); Thu, 28 Mar 2019 14:08:12 -0400 Received: from mail-it1-f195.google.com ([209.85.166.195]:38487 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727417AbfC1SIL (ORCPT ); Thu, 28 Mar 2019 14:08:11 -0400 Received: by mail-it1-f195.google.com with SMTP id f22so7574806ita.3 for ; Thu, 28 Mar 2019 11:08:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mhh689jASFqwg5CvKSsCVL3z97Hnu8T15rPfSQcYnLE=; b=NzaIE6uxYbEDkPgRduGRI2AmLoA943ZKQwON8MKRRwREEvb5qNVErkZCYnkweT35XG e/O50ZrnBInnKAyC64xIr32xixDaFfMBKPnppk60M3Z7IhKhmnk67EraFP20e5+8nrrq u7x2D0n6yzuz6kVMulwBnHknl0YxdSQseu0SDRAQ9jkC3E22SlWVHt/iiW47AXTfR5WZ DW4uHzhy1IVQV4n3rBuDUBPFrYo1Tqkksa02PunTAKwn+pffrTVlejqP3HWdmf0fI5b4 K4a+K8+DLDH1prvJEI240MgQMecSe+I7Zit4ejZ5jACKbSpX9hc9ROI9L7OagEDqsYFe 6OuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mhh689jASFqwg5CvKSsCVL3z97Hnu8T15rPfSQcYnLE=; b=btyj8MxONxpWmJ7THGr3a0RbbO6ClRJm/FoZZr3azm3GzJor+cXzk+ufwUbkhH/8xP MJaqaV3kkdPlGjZsVZOL9WEY3xevrWicDeYPyWFxDpfK4sz4d0yuPj2ozsy/VQ+YeYiN TN/eJs76cIP8nO4rYFMQDLgCxn1+0qmVp/5DpmYBzipYYzVx13MWYxvHIwueZTNAkv3c nhWQUow8e7zqAxLpYfdcf5vno02iVPRz+0TNFIH345QOFyPnmACBa7nAJ6Np8xZ4PxqM bt/KZq34/OwtReuWw844b3P04Dy7oNX5d4q+hwvuW1BV+23y5ghfGjesSwu87DD7Zyzz atRQ== X-Gm-Message-State: APjAAAUODkXJ3wfxM2IQKQGF/9SaNiMa9gKs5tK6jY1NJkshgO7gZvUf d7LKUEkrZHu+lmiGkHiXrCXVg9ssv3m2JFjzNtTmNQ== X-Received: by 2002:a02:3d84:: with SMTP id n126mr26134078jan.102.1553796489486; Thu, 28 Mar 2019 11:08:09 -0700 (PDT) MIME-Version: 1.0 References: <20190325220954.29054-1-matthewgarrett@google.com> <20190325220954.29054-24-matthewgarrett@google.com> <20190325164221.5d8687bd@shemminger-XPS-13-9360> In-Reply-To: From: Matthew Garrett Date: Thu, 28 Mar 2019 11:07:58 -0700 Message-ID: Subject: Re: [PATCH 23/27] bpf: Restrict kernel image access functions when the kernel is locked down To: James Morris Cc: Andy Lutomirski , Stephen Hemminger , Linux API , LSM List , LKML , David Howells , Alexei Starovoitov , Network Development , Chun-Yi Lee , Daniel Borkmann , Kees Cook , Will Drewry Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 27, 2019 at 8:15 PM James Morris wrote: > OTOH, this seems like a combination of mechanism and policy. The 3 modes > are a help here, but I wonder if they may be too coarse grained still, > e.g. if someone wants to allow a specific mechanism according to their own > threat model and mitigations. In general the interfaces blocked by these patches could also be blocked with an LSM, and I'd guess that people with more fine-grained requirements would probably take that approach. > Secure boot gives you some assurance of the static state of the system at > boot time, and lockdown is certainly useful (with or without secure boot), > but it's not a complete solution to runtime kernel integrity protection by > any stretch of the imagination. I'm concerned about it being perceived as > such. What do you think the functionality gaps are in terms of ensuring kernel integrity (other than kernel flaws that allow the restrictions to be bypassed)?