linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [GIT PULL] Kernel lockdown for secure boot
@ 2018-04-04  2:34 Alexei Starovoitov
  2018-04-04  4:31 ` Matthew Garrett
  2018-04-08  8:07 ` joeyli
  0 siblings, 2 replies; 112+ messages in thread
From: Alexei Starovoitov @ 2018-04-04  2:34 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: David Howells, Ard Biesheuvel, James Morris, One Thousand Gnomes,
	Linus Torvalds, Matthew Garrett, Greg KH, LKML, Justin Forbes,
	linux-man, joeyli, LSM List, Linux API, Kees Cook, linux-efi

On Tue, Apr 3, 2018 at 9:26 AM, Andy Lutomirski <luto@kernel.org> wrote:
> On Tue, Apr 3, 2018 at 8:41 AM, Alexei Starovoitov
> <alexei.starovoitov@gmail.com> wrote:
>> On Tue, Apr 03, 2018 at 08:11:07AM -0700, Andy Lutomirski wrote:
>>> >
>>> >> "bpf: Restrict kernel image access functions when the kernel is locked down":
>>> >> This patch just sucks in general.
>>> >
>>> > Yes - but that's what Alexei Starovoitov specified.  bpf kind of sucks since
>>> > it gives you unrestricted access to the kernel.
>>>
>>> bpf, in certain contexts, gives you unrestricted access to *reading*
>>> kernel memory.  bpf should, under no circumstances, let you write to
>>> the kernel unless you're using fault injection or similar.
>>>
>>> I'm surprised that Alexei acked this patch.  If something like XDP or
>>> bpfilter starts becoming widely used, this patch will require a lot of
>>> reworking to avoid breaking standard distros.
>>
>> my understanding was that this lockdown set attemps to disallow _reads_
>> of kernel memory from anything, so first version of patch was adding
>> run-time checks for bpf_probe_read() which is no-go
>> and without this helper the bpf for tracing is losing a lot of its power,
>> so the easiest is to disable it all.
>
> Fair enough.

Actually looking at the patch again:
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?h=efi-lock-down&id=78bb0059c3b8304a8d124b55feebc780fb3e0500

If the only thing that folks are paranoid about is reading
arbitrary kernel memory with bpf_probe_read() helper
then preferred patch would be to disable it during verification
when in lockdown mode.
No run-time overhead and android folks will be happy
that lockdown doesn't break their work.
They converted out-of-tree networking accounting
module and corresponding user daemon to use bpf:
https://www.linuxplumbersconf.org/2017/ocw/system/presentations/4791/original/eBPF%20cgroup%20filters%20for%20data%20usage%20accounting%20on%20Android.pdf

^ permalink raw reply	[flat|nested] 112+ messages in thread

end of thread, other threads:[~2018-04-09 13:55 UTC | newest]

Thread overview: 112+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4136.1522452584@warthog.procyon.org.uk>
     [not found] ` <alpine.LRH.2.21.1803311145180.7769@namei.org>
2018-04-03  0:37   ` [GIT PULL] Kernel lockdown for secure boot Andy Lutomirski
2018-04-03  0:59     ` Kees Cook
2018-04-03  1:47       ` Andy Lutomirski
2018-04-03  7:06   ` David Howells
2018-04-03 15:11     ` Andy Lutomirski
2018-04-03 15:41       ` Alexei Starovoitov
2018-04-03 16:26         ` Andy Lutomirski
2018-04-03 16:29       ` Matthew Garrett
2018-04-03 16:45         ` Andy Lutomirski
     [not found]           ` <CAGXu5j+CyVXEvsMarJjBwaNh7poVZtmit5PGmQM9rKKqZPqVXg@mail.gmail.com>
2018-04-03 19:01             ` Andy Lutomirski
2018-04-03 19:07               ` Kees Cook
2018-04-03 19:29           ` Matthew Garrett
2018-04-03 21:51             ` Andy Lutomirski
2018-04-04 18:42               ` Peter Jones
2018-04-04 20:01                 ` Thomas Gleixner
2018-04-04 20:18                   ` Matthew Garrett
2018-04-05 18:47                 ` Andy Lutomirski
2018-04-06  4:42                 ` Peter Dolding
2018-04-03 17:16         ` David Howells
2018-04-03 19:01           ` Andy Lutomirski
2018-04-03 19:49           ` David Howells
2018-04-03 21:58             ` Andy Lutomirski
2018-04-03 22:32             ` David Howells
2018-04-03 22:39               ` Andy Lutomirski
2018-04-03 22:46                 ` Linus Torvalds
2018-04-03 22:51                   ` Matthew Garrett
2018-04-03 22:53                     ` Andy Lutomirski
2018-04-03 23:09                       ` Matthew Garrett
2018-04-03 23:08                     ` Linus Torvalds
2018-04-03 23:10                       ` Linus Torvalds
2018-04-03 23:17                       ` Matthew Garrett
2018-04-03 23:26                         ` Linus Torvalds
2018-04-03 23:39                           ` Linus Torvalds
2018-04-03 23:47                             ` Matthew Garrett
2018-04-04  0:02                               ` Linus Torvalds
2018-04-04  0:04                                 ` Matthew Garrett
2018-04-04  0:08                                   ` Linus Torvalds
2018-04-04  0:12                                     ` Matthew Garrett
2018-04-05 14:58                                       ` Alan Cox
2018-04-04  0:22                                   ` David Howells
2018-04-05 17:59                                   ` Alan Cox
2018-04-05 18:03                                     ` Matthew Garrett
2018-04-03 23:45                           ` Matthew Garrett
2018-04-03 23:55                             ` Linus Torvalds
2018-04-03 23:59                               ` Matthew Garrett
2018-04-04  0:06                                 ` Linus Torvalds
2018-04-04  0:10                                   ` Matthew Garrett
2018-04-04  0:15                                     ` Linus Torvalds
2018-04-04  0:16                                       ` Matthew Garrett
2018-04-04  0:18                                         ` Andy Lutomirski
2018-04-04  0:19                                           ` Matthew Garrett
2018-04-04  9:04                                             ` Greg Kroah-Hartman
2018-04-04  0:25                                         ` Linus Torvalds
2018-04-04  0:33                                           ` Linus Torvalds
2018-04-04  0:46                                             ` Matthew Garrett
2018-04-04  0:56                                               ` Linus Torvalds
2018-04-04  1:13                                                 ` Matthew Garrett
2018-04-04  1:43                                                   ` Linus Torvalds
2018-04-04  4:30                                                     ` Matthew Garrett
2018-04-04 12:57                                                       ` Theodore Y. Ts'o
2018-04-04 13:02                                                         ` Greg Kroah-Hartman
2018-04-04 13:34                                                           ` Theodore Y. Ts'o
2018-04-04 13:57                                                             ` Greg Kroah-Hartman
2018-04-04 13:29                                                         ` Mike Galbraith
2018-04-04 16:20                                                         ` Matthew Garrett
2018-04-08 22:00                                                         ` Pavel Machek
2018-04-04 13:33                                                       ` David Howells
2018-04-04 13:52                                                         ` Theodore Y. Ts'o
2018-04-04 16:22                                                           ` Matthew Garrett
2018-04-04 16:39                                                             ` Andy Lutomirski
2018-04-04 16:42                                                               ` Matthew Garrett
2018-04-04 16:46                                                               ` Justin Forbes
2018-04-05  0:05                                                             ` Peter Dolding
2018-04-05  0:20                                                               ` Matthew Garrett
2018-04-04 13:57                                                         ` David Howells
2018-04-04 16:09                                                       ` Linus Torvalds
2018-04-04 16:17                                                         ` Matthew Garrett
2018-04-04  6:56                                                   ` Peter Dolding
2018-04-04 16:26                                                     ` Matthew Garrett
2018-04-05  1:28                                                       ` Peter Dolding
2018-04-04  1:36                                                 ` Justin Forbes
     [not found]                                                 ` <CAFbkSA0ursG3RGWU19LQiD6u30h5V=Aqj3oVyHQCiX6MLopYUg@mail.gmail.com>
2018-04-04  1:58                                                   ` Linus Torvalds
2018-04-04  0:17                                   ` Jann Horn
2018-04-04  0:23                                     ` Andy Lutomirski
2018-04-04  8:05                                     ` David Howells
2018-04-04 14:35                                       ` Andy Lutomirski
2018-04-04 14:44                                       ` David Howells
2018-04-04 15:43                                       ` Eric W. Biederman
2018-04-03 23:56                         ` David Howells
2018-04-03 23:58                           ` Linus Torvalds
2018-04-03 23:39                 ` David Howells
2018-04-03 23:48                   ` Andy Lutomirski
2018-04-08  8:23                   ` Pavel Machek
2018-04-03 23:12               ` David Howells
2018-04-03 23:27                 ` Linus Torvalds
2018-04-03 23:42                 ` Andy Lutomirski
2018-04-03 20:53         ` Linus Torvalds
2018-04-03 20:54           ` Matthew Garrett
2018-04-03 21:01             ` Linus Torvalds
2018-04-03 21:08               ` Matthew Garrett
2018-04-03 21:21                 ` Al Viro
2018-04-03 21:37                   ` Matthew Garrett
2018-04-03 21:26                 ` Linus Torvalds
2018-04-03 21:32                   ` Matthew Garrett
2018-04-08  8:10                 ` Pavel Machek
2018-04-04  2:34 Alexei Starovoitov
2018-04-04  4:31 ` Matthew Garrett
2018-04-08  7:44   ` joeyli
2018-04-08  8:07 ` joeyli
2018-04-09  3:40   ` Alexei Starovoitov
2018-04-09  8:14     ` Daniel Borkmann
2018-04-09 13:55     ` joeyli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).