Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3730375img; Mon, 25 Mar 2019 17:00:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNp6n1sOAg19hDoxa2JubNjSJmiKlPIq9rikIDpVtXg0mn3faS6rtW2Lzmc4YomjtR4bh5 X-Received: by 2002:a63:f80f:: with SMTP id n15mr26023489pgh.283.1553558448728; Mon, 25 Mar 2019 17:00:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553558448; cv=none; d=google.com; s=arc-20160816; b=qM79ElSPNXslGquVEcZMbdT//pbo6MvvVnjfXLBiqZdcHKTWkn1fRvvAf9aFoMxVXi 8fteHOBjzcAHSB4ElPMl7otD10GPUdzFXW221CgU8ZplCLrq1AdaDdSmxMXqYioOf7hk SqwrblF8MomOStA7/ZjFeXVHCJwjZVhAuvPwAMgdgK/P1gsmfQVzkq4KVlWeDbkH2yYa hQ7Io1FBkBbyIqTnsRaPEZRgGySi35rqzwduhAJIsSKCR1YamK2fNwe6UxLW4CH60lO6 vn/1AdkhFVdR+SDDxmY3XnY7skgyw3T/ixcSD0G0VkqwCNhBlDJQ21Y+XckJep8gMR8N OzMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=fiI2buvf1c7pUiH9YIPF0JCtZwcv8jOJ4z2y1uVD5A4=; b=ZPyJInocEa5a/Rh2YUqiBnbevUBFFgh2hZipUtM5IjX8stOmk6gTfWimrwABbPDIav 2BhC+ZorQ849ussPoxwEo0r1mAS0uHoBl/AwKE+5npRdT3AFmYYgpneK3aHjPX/+LGEC aW4TsMhv1TJWpNEa5uJuJ1D4Ne5uHV0rSjp9BJpciov3AC4fnTmDuEaVa5rXM5Vw53dO TTBlRyBMTgqKCd4SSae1dGYdzUwE9IL1df5pwGvzGtGHVEiLbJyAmaqTxlBWWOUSRdEV Al3dwNYSh4kawZJMPvFD5xUBHLYRGN3u+6cH/4YIK5U+KozO9786x3YKBalrkHOhEQU9 5XzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=SRRLoe3l; 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 a19si14079673pgw.244.2019.03.25.17.00.33; Mon, 25 Mar 2019 17:00:48 -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=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=SRRLoe3l; 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 S1729966AbfCYX7u (ORCPT + 99 others); Mon, 25 Mar 2019 19:59:50 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44846 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727099AbfCYX7t (ORCPT ); Mon, 25 Mar 2019 19:59:49 -0400 Received: by mail-pf1-f193.google.com with SMTP id y13so1069847pfm.11 for ; Mon, 25 Mar 2019 16:59:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fiI2buvf1c7pUiH9YIPF0JCtZwcv8jOJ4z2y1uVD5A4=; b=SRRLoe3lzMtwQcYxhiJroGdC2RLxArCfyG5Fg+L/lmf6tEl9MQB1kOxrrHK+tj6tXz yu7LkomrWJnzKqwkV78XIubpC1RJNEEZ+KmbwAzWWQX84xJ/NUhz96Ko+/kuhe3FRcFj ZOMrhI0jIkGcITZtCr9Zv3BMHCj0b45bZLf4izDkJyUCHETB07HiNr+0lKJWIFI5aDCS urslaorO1JUg0f/KG22tQ2sivV9LOhU9Hh2Q/rHjvx8C/UscprRgyp5rsVnEL1pBvqh+ ft9xSO9YU2+dEsqSLYf05cI+KWKuN8NO9OqdSGSIggQm0eQD5QOp9uYEIOI/bxmvB1KA a+2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fiI2buvf1c7pUiH9YIPF0JCtZwcv8jOJ4z2y1uVD5A4=; b=OnBr/uU4R87lWuCocxFTDaYJIr0RnW/oZhZACt6ZwWP+Dh9vpZXQVBtWkH10unfD81 2+BEAkNr1V5ppr6IgZejT5C13Flpl2/QojbEZnqOENzQDtvMtc2IXfflopZ5UkK9VDw2 N8WnpjMOdLJ4dyI1QRNVAThj4rBF27WJKnBHvwTyS4+Z9H8gN7XjWlNI+FL2vrqbNQBI MRpPWQ1O4ZFGlSenfdkKM86xXVtrcmZy95+7FjAv2sbWs81LcFWkPB3u1I001mPdijnT lqN9uFUD3NwzQKB1Ldfo8uilX/wJ9nGlspjncxTCbV537yCGxa9pKeqoAIo3HLDsvnj9 McHw== X-Gm-Message-State: APjAAAUnay9aXlYdhjK7cpQTeVT5EYsjrmgVCMHhXqUySf40FUJQ7/lY dTzAUU3vc++APzGBAUPYpeHObA== X-Received: by 2002:a63:2d5:: with SMTP id 204mr25433452pgc.407.1553558388772; Mon, 25 Mar 2019 16:59:48 -0700 (PDT) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id c11sm26706069pgd.24.2019.03.25.16.59.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Mar 2019 16:59:48 -0700 (PDT) Date: Mon, 25 Mar 2019 16:59:44 -0700 From: Stephen Hemminger To: Matthew Garrett Cc: jmorris@namei.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, dhowells@redhat.com, Alexei Starovoitov , netdev@vger.kernel.org, Chun-Yi Lee , Daniel Borkmann , Kees Cook , Andy Lutomirski , Will Drewry Subject: Re: [PATCH 23/27] bpf: Restrict kernel image access functions when the kernel is locked down Message-ID: <20190325165944.7a8c0ecf@shemminger-XPS-13-9360> In-Reply-To: <20190325164221.5d8687bd@shemminger-XPS-13-9360> References: <20190325220954.29054-1-matthewgarrett@google.com> <20190325220954.29054-24-matthewgarrett@google.com> <20190325164221.5d8687bd@shemminger-XPS-13-9360> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 25 Mar 2019 16:42:21 -0700 Stephen Hemminger wrote: > On Mon, 25 Mar 2019 15:09:50 -0700 > Matthew Garrett wrote: > > > From: David Howells > > > > There are some bpf functions can be used to read kernel memory: > > bpf_probe_read, bpf_probe_write_user and bpf_trace_printk. These allow > > private keys in kernel memory (e.g. the hibernation image signing key) to > > be read by an eBPF program and kernel memory to be altered without > > restriction. > > > > Completely prohibit the use of BPF when the kernel is locked down. > > > > Suggested-by: Alexei Starovoitov > > Signed-off-by: David Howells > > cc: netdev@vger.kernel.org > > cc: Chun-Yi Lee > > cc: Alexei Starovoitov > > Cc: Daniel Borkmann > > Signed-off-by: Matthew Garrett > > Wouldn't this mean that Seccomp won't work in locked down mode? Never mind. This is about bpf system call, not locking out all bpf in general.