Re: [PATCH 1/6] ebpf: add a seccomp program type

From
Kees Cook <hidden>
Date
2015-09-09 16:38:07
Also in
lkml
Reply to
Daniel Borkmann, 2015-09-09
On Wed, Sep 9, 2015 at 9:09 AM, Daniel Borkmann [off-list ref] wrote:
On 09/09/2015 06:07 PM, Alexei Starovoitov wrote:
quoted
On Wed, Sep 09, 2015 at 09:50:35AM -0600, Tycho Andersen wrote:
[...]
quoted
quoted
Thoughts?

Please do not add any per-instruction hacks. None of them are
necessary. Classic had to do extra ugly checks in seccomp only
because verifier wasn't flexible enough.
If you don't want to see any BPF_CALL in seccomp, just have
empty get_func_proto() callback for BPF_PROG_TYPE_SECCOMP
and verifier will reject all calls.
Currently we have only two non-generic instrucitons
LD_ABS and LD_IND that are avaialable for sockets/TC only,
because these are legacy instructions and we had to make
exceptions for them.
Yep, +1.
Hrmpf. This adds to the cognitive load for accepting this patch
series. :P Now I have to convince myself that there is no additional
exposure to seccomp by using the entire set of eBPF instructions.
While I'm pretty sure it'll be fine, I really don't want to risk being
wrong and opening a hole here. I will spend some time looking at the
new eBPF instructions...

-Kees

-- 
Kees Cook
Chrome OS Security
Thread (55 messages) 55 messages, 6 authors, last reply 2015-09-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help