Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3720058img; Mon, 25 Mar 2019 16:43:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzw+kUbv9NhWlnb5wyicXEulJezWf82raIpdGXb/GtzDrS8rYJJGdEh3arT3S1CrdpKDx/I X-Received: by 2002:a63:c242:: with SMTP id l2mr25979215pgg.138.1553557400131; Mon, 25 Mar 2019 16:43:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553557400; cv=none; d=google.com; s=arc-20160816; b=dkzGZ3halma/U0USJz8bnySNa9atEHX1R+zVK+sTD8Cr2/HYlaRA12htRKn4UJp0FI HhfEAQQ9byP+w9fcj82wX7eakK+mbUKMUVb5mlvXmbtDR3xKS7MSFGQMsXBCv73Q7PiU +Aw/bz/lcYdKHNjCl/CsYYZhHDFiTfUDAHXQsb5b77OWqOBR9IWReApfKcL4W+K8Q9Vf Mt3pMuuaa8aQIIgAEvxgttnOT+07dwnaIIOVF3RfnftAJBlAZFfhXV058eNJ52d8SNwB Us1gm2pO3TFEnrK4qJKnrEwe8+UmRbHG7cVSv6Nuq54F1gRtUlfuzxhPbLTXdxFYYjtk 7hjQ== 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=VSgTSStmyucgCQUG0l9SmzKEAqnVSFBHIEtJeqjh0Xs=; b=T09MFODURg5PVWISdCEY3N0KZ40rq9tkdzXnHHjmK07Kyiat9fFc5SIOQq3E7lL8dB 3wKHSKserlR1k0WGvhmjgfmKka2+5eFKpJHl+SNoGtA6GDwtJkteduaJFmTOZ+kG0VGF 8VzGlksX5OfA44OaNmPV4Ix/A7B/75yjrCZOLmb3NvP0nf6r0eGO2+bGVS9YjMM9/xTP aPBqUpWMl3+aG8mpg+LtIA2BhiPYIp4V23HskOeDts/q1c3cn+28GPX7aTrFFGF6USCg yBrcgBchLxqd+FWXbM9dTEfWOrso+if3u94QVpfkmWxqIAMsugmFhIrxYQQwBytU6JV1 iocQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=Hr2sodvi; 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 v41si16327911plg.8.2019.03.25.16.43.05; Mon, 25 Mar 2019 16:43:20 -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=Hr2sodvi; 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 S1730422AbfCYXm0 (ORCPT + 99 others); Mon, 25 Mar 2019 19:42:26 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:34871 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726301AbfCYXm0 (ORCPT ); Mon, 25 Mar 2019 19:42:26 -0400 Received: by mail-pl1-f194.google.com with SMTP id p19so697614plo.2 for ; Mon, 25 Mar 2019 16:42:25 -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=VSgTSStmyucgCQUG0l9SmzKEAqnVSFBHIEtJeqjh0Xs=; b=Hr2sodviulFCbh9JwInjMrl66OSdt4DR498G9P5YOCX1xfHEuql6GzifbTtbDa08u5 vrMuRFR9TRow0yDrd97cltle2gtcJJEeWaX5ZFTENNYSpqSzzqunQ/42or7ZVfDkBRgV cIbyKRltVv4V1XrTkO0q9LzEQIh5Z7LHdgyFRxruu1/fl+E14iPuVKlvaNAu+MTUe5Du 9KTe0bshsJAy/JMGKyq4JJiWRFe1T/mKxN4FwVQxxRP5yYAx1hr6rq97p+NJDJeiFcSI cK7vzk6D3qt7ywa6lfgx021X6EQpcKlaQUQCJJ2jkkgrUgjP28QS6zBNLE+il1jmsH8W 9MpQ== 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=VSgTSStmyucgCQUG0l9SmzKEAqnVSFBHIEtJeqjh0Xs=; b=c9ES/gcCFVlhwVdAIJjk0Pco/BaytMYSrSZP0G87igYXHokamI5qMh3Tx+I9q1ypNo Pinlm0aVnkR7FuiZDbjEVplsvSTwMT/ZfdUnfmzR8m3v+V/quMOdSnRHtv1TZ0v3emvl U/8eKF2S+pnYXrKq5nb+iNt0gn3sckLBAyWlR5R04lER52Jmwfk3Fp68peB6rW0auRvg 5LliRf+rc5zTyzJzHEdvC6vQockSjglItqP/wADZ4mpMrh3jRr51Fb38zIhBjw86TpFp trZM9lUZIPDP22RqqbBxM3WqaiwJ1ObCpb8MgZMuQeqIs+Jz0gsW2PmAuWthsJ/0TjoS 7UEg== X-Gm-Message-State: APjAAAWzLFyFS2Ag9ITLWtEOOZ32aC454pS10VpnJUJPqWo8gIjs93Ti m27exykGWt8/3nWhqR02aZiBog== X-Received: by 2002:a17:902:1c9:: with SMTP id b67mr27150786plb.176.1553557345500; Mon, 25 Mar 2019 16:42:25 -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 a13sm18829204pgw.91.2019.03.25.16.42.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Mar 2019 16:42:25 -0700 (PDT) Date: Mon, 25 Mar 2019 16:42:21 -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: <20190325164221.5d8687bd@shemminger-XPS-13-9360> In-Reply-To: <20190325220954.29054-24-matthewgarrett@google.com> References: <20190325220954.29054-1-matthewgarrett@google.com> <20190325220954.29054-24-matthewgarrett@google.com> 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 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?