From: Jeffrey Vander Stoep via Selinux <selinux-+05T5uksL2qpZYMLLGbcSA@public.gmane.org>
To: Chenbo Feng <fengc-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
SELinux <Selinux-+05T5uksL2qpZYMLLGbcSA@public.gmane.org>,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Permissions for eBPF objects
Date: Fri, 25 Aug 2017 17:56:47 +0000 [thread overview]
Message-ID: <CABXk95ATb_AFk+4GX9Xw+HEU6No8irb0mOoLE9O4EBuLAgA-1w@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 957 bytes --]
I’d like to get your thoughts on adding LSM permission checks on BPF
objects.
By default, the ability to create and use eBPF maps/programs requires
CAP_SYS_ADMIN [1]. Alternatively, all processes can be granted access to
bpf() functions. This seems like poor granularity. [2]
Like files and sockets, eBPF maps and programs can be passed between
processes by FD and have a number of functions that map cleanly to
permissions.
Let me know what you think. Are there simpler alternative approaches that
we haven’t considered?
Thanks!
Jeff
[1] http://man7.org/linux/man-pages/man2/bpf.2.html NOTES section
[2] We are considering eBPF for network filtering by netd. Giving netd
CAP_SYS_ADMIN would considerably increase netd’s privileges. Alternatively
allowing all processes permission to use bpf() goes against the principle
of least privilege exposing a lot of kernel attack surface to processes
that do not actually need it.
[-- Attachment #2: Type: text/html, Size: 1175 bytes --]
next reply other threads:[~2017-08-25 17:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-25 17:56 Jeffrey Vander Stoep via Selinux [this message]
[not found] ` <CABXk95ATb_AFk+4GX9Xw+HEU6No8irb0mOoLE9O4EBuLAgA-1w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-25 18:03 ` Permissions for eBPF objects Jeffrey Vander Stoep via Selinux
-- strict thread matches above, loose matches on Subject: below --
2017-08-25 18:01 Jeffrey Vander Stoep
[not found] ` <CABXk95AiYO7D8o79TBdt0_0g1TXfULSpL5i7KzHF3R4i-WhwHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-25 19:26 ` Stephen Smalley
2017-08-25 19:45 ` Jeffrey Vander Stoep
2017-08-25 19:52 ` Chenbo Feng
2017-08-25 20:07 ` Daniel Borkmann
2017-08-26 1:03 ` Alexei Starovoitov
2017-08-29 0:47 ` Chenbo Feng
2017-08-29 1:15 ` Alexei Starovoitov
2017-08-29 1:44 ` Chenbo Feng
2017-08-29 22:23 ` Mickaël Salaün
[not found] ` <CAMOXUJkQ-Wh==9nzgx3Sq4RUEBK5ArHk4b=AL0N65L9g6cAqcg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-25 20:40 ` Stephen Smalley
2017-08-25 20:49 ` Chenbo Feng
2017-08-25 20:04 ` Casey Schaufler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABXk95ATb_AFk+4GX9Xw+HEU6No8irb0mOoLE9O4EBuLAgA-1w@mail.gmail.com \
--to=selinux-+05t5uksl2qpzymllgbcsa@public.gmane.org \
--cc=fengc-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=jeffv-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).