Files
linux/include/linux
Lorenz Bauer 4ac2add659 bpf: flow_dissector: Check value of unused flags to BPF_PROG_DETACH
Using BPF_PROG_DETACH on a flow dissector program supports neither
attach_flags nor attach_bpf_fd. Yet no value is enforced for them.

Enforce that attach_flags are zero, and require the current program
to be passed via attach_bpf_fd. This allows us to remove the check
for CAP_SYS_ADMIN, since userspace can now no longer remove
arbitrary flow dissector programs.

Fixes: b27f7bb590 ("flow_dissector: Move out netns_bpf prog callbacks")
Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200629095630.7933-3-lmb@cloudflare.com
2020-06-30 10:46:38 -07:00
..
2020-05-24 20:48:11 +02:00
2020-05-19 09:40:29 -06:00
2020-06-09 09:39:13 -07:00
2020-05-28 07:59:45 -07:00
2020-05-28 18:07:11 +02:00
2020-06-02 15:15:46 +01:00
2020-05-28 10:31:09 +02:00
2020-06-10 19:14:18 -07:00
2020-05-28 11:11:45 -07:00
2020-05-29 14:52:53 +02:00