bpf: disallow bpf tc programs access current->pid,uid
authorAlexei Starovoitov <ast@plumgrid.com>
Tue, 16 Jun 2015 03:49:24 +0000 (20:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Jun 2015 03:51:20 +0000 (20:51 -0700)
Accessing current->pid/uid from cls_bpf may lead to misleading results and
should not be used when TC classifiers need accurate information about pid/uid.

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/filter.c

index 65ff107d3d29599ecf728c3c1b1492d4d2cc076f..be3098fb65e45624e2e5a94b0f653d66e68293d9 100644 (file)
@@ -1461,12 +1461,6 @@ tc_cls_act_func_proto(enum bpf_func_id func_id)
                return &bpf_l4_csum_replace_proto;
        case BPF_FUNC_clone_redirect:
                return &bpf_clone_redirect_proto;
-       case BPF_FUNC_get_current_pid_tgid:
-               return &bpf_get_current_pid_tgid_proto;
-       case BPF_FUNC_get_current_uid_gid:
-               return &bpf_get_current_uid_gid_proto;
-       case BPF_FUNC_get_current_comm:
-               return &bpf_get_current_comm_proto;
        default:
                return sk_filter_func_proto(func_id);
        }