Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1239973
| From | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs |
| Date | 2015-10-05 23:20 +0200 |
| Message-ID | <qglkR-2ny-5@gated-at.bofh.it> (permalink) |
| References | <qgkRP-1x8-3@gated-at.bofh.it> <qgkRQ-1x8-15@gated-at.bofh.it> <qglbd-2cb-57@gated-at.bofh.it> <qglkR-2ny-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Oct 5, 2015 at 2:12 PM, Alexei Starovoitov <ast@plumgrid.com> wrote: > On 10/5/15 2:00 PM, Kees Cook wrote: >> >> On Mon, Oct 5, 2015 at 1:48 PM, Alexei Starovoitov<ast@plumgrid.com> >> wrote: >>> >>> >In order to let unprivileged users load and execute eBPF programs >>> >teach verifier to prevent pointer leaks. >>> >Verifier will prevent >>> >- any arithmetic on pointers >>> > (except R10+Imm which is used to compute stack addresses) >>> >- comparison of pointers >>> >- passing pointers to helper functions >>> >- indirectly passing pointers in stack to helper functions >>> >- returning pointer from bpf program >>> >- storing pointers into ctx or maps >> >> Does the arithmetic restriction include using a pointer as an index to >> a maps-based tail call? I'm still worried about pointer-based >> side-effects. > > > the array maps that hold FDs (BPF_MAP_TYPE_PROG_ARRAY and > BPF_MAP_TYPE_PERF_EVENT_ARRAY) don't have lookup/update accessors > from the program side, so programs cannot see or manipulate > those pointers. > For the former only bpf_tail_call() is allowed that takes integer > index and jumps to it. And the latter map accessed with > bpf_perf_event_read() that also takes index only (this helper > is not available to socket filters anyway). > Also bpf_tail_call() can only jump to the program of the same type. > So I'm quite certain it's safe. At some point there will be an unprivileged way to create a map, though, and we don't want to let pointers get poked into the map. Or am I misunderstanding? --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next 1/2] bpf: enable non-root eBPF programs Alexei Starovoitov <ast@plumgrid.com> - 2015-10-05 22:50 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Kees Cook <keescook@chromium.org> - 2015-10-05 23:10 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Andy Lutomirski <luto@amacapital.net> - 2015-10-05 23:20 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Alexei Starovoitov <ast@plumgrid.com> - 2015-10-05 23:40 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Alexei Starovoitov <ast@plumgrid.com> - 2015-10-05 23:20 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Kees Cook <keescook@chromium.org> - 2015-10-06 00:10 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Alexei Starovoitov <ast@plumgrid.com> - 2015-10-06 02:30 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Daniel Borkmann <daniel@iogearbox.net> - 2015-10-06 00:20 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Alexei Starovoitov <ast@plumgrid.com> - 2015-10-06 03:00 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Ingo Molnar <mingo@kernel.org> - 2015-10-06 09:20 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Daniel Borkmann <daniel@iogearbox.net> - 2015-10-06 10:10 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Ingo Molnar <mingo@kernel.org> - 2015-10-06 10:30 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Daniel Borkmann <daniel@iogearbox.net> - 2015-10-06 10:50 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Alexei Starovoitov <ast@plumgrid.com> - 2015-10-06 20:00 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Eric Dumazet <eric.dumazet@gmail.com> - 2015-10-06 20:00 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Andy Lutomirski <luto@amacapital.net> - 2015-10-06 20:10 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Ingo Molnar <mingo@kernel.org> - 2015-10-07 08:10 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Alexei Starovoitov <ast@plumgrid.com> - 2015-10-06 21:30 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Daniel Borkmann <daniel@iogearbox.net> - 2015-10-06 20:10 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Daniel Borkmann <daniel@iogearbox.net> - 2015-10-06 14:50 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Alexei Starovoitov <ast@plumgrid.com> - 2015-10-07 23:30 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Daniel Borkmann <daniel@iogearbox.net> - 2015-10-08 00:10 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Kees Cook <keescook@chromium.org> - 2015-10-08 00:30 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Alexei Starovoitov <ast@plumgrid.com> - 2015-10-08 01:50 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Ingo Molnar <mingo@kernel.org> - 2015-10-08 08:30 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Alexei Starovoitov <ast@plumgrid.com> - 2015-10-08 08:40 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Kees Cook <keescook@chromium.org> - 2015-10-08 19:50 +0200
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs Alexei Starovoitov <ast@plumgrid.com> - 2015-10-08 04:30 +0200
csiph-web