lkml.org 
[lkml]   [2015]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6] ebpf: add a seccomp program type
On 09/04/2015 11:50 PM, Andy Lutomirski wrote:
> On Fri, Sep 4, 2015 at 9:04 AM, Tycho Andersen
[...]
>> +static const struct bpf_func_proto *
>> +seccomp_func_proto(enum bpf_func_id func_id)
>> +{
>> + /* Right now seccomp eBPF loading doesn't support maps; seccomp filters
>> + * are considered to be read-only after they're installed, so map fds
>> + * probably need to be invalidated when a seccomp filter with maps is
>> + * installed.
>> + *
>> + * The rest of these might be reasonable to call from seccomp, so we
>> + * export them.
>> + */
>> + switch (func_id) {
>> + case BPF_FUNC_ktime_get_ns:
>> + return &bpf_ktime_get_ns_proto;
>> + case BPF_FUNC_trace_printk:
>> + return bpf_get_trace_printk_proto();
>> + case BPF_FUNC_get_prandom_u32:
>> + return &bpf_get_prandom_u32_proto;
>
> I don't think we should expose prandom to unprivileged userspace.
> This may be an attack vector.

Agreed, it should not be exposed for unpriv'ed users.


\
 
 \ /
  Last update: 2015-09-09 18:41    [W:0.141 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site