]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: sockmap: Check value of unused args to BPF_PROG_ATTACH
authorLorenz Bauer <lmb@cloudflare.com>
Mon, 29 Jun 2020 09:56:27 +0000 (10:56 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 30 Jun 2020 17:46:39 +0000 (10:46 -0700)
commitcdf362108a9c0c8baefa57c45fd5a56ef6306435
tree335fdf3b51260b4b2445c736b9ca24899b181bcd
parent0a9d49396950781e471ffd06faadcc616865da77
bpf: sockmap: Check value of unused args to BPF_PROG_ATTACH

Using BPF_PROG_ATTACH on a sockmap program currently understands no
flags or replace_bpf_fd, but accepts any value. Return EINVAL instead.

Fixes: 38506f4bbc9d ("bpf, sockmap: convert to generic sk_msg interface")
Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200629095630.7933-4-lmb@cloudflare.com
net/core/sock_map.c