bpf/verifier: reject invalid LD_ABS | BPF_DW instruction
authorAlexei Starovoitov <ast@fb.com>
Tue, 12 Apr 2016 17:26:19 +0000 (10:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Apr 2016 05:31:50 +0000 (01:31 -0400)
commitd82bccc69041a51f7b7b9b4a36db0772f4cdba21
treee7566bc2ab7ba1ec1bd316b87b62c128dbf63f18
parent3dcd493fbebfd631913df6e2773cc295d3bf7d22
bpf/verifier: reject invalid LD_ABS | BPF_DW instruction

verifier must check for reserved size bits in instruction opcode and
reject BPF_LD | BPF_ABS | BPF_DW and BPF_LD | BPF_IND | BPF_DW instructions,
otherwise interpreter will WARN_RATELIMIT on them during execution.

Fixes: ddd872bc3098 ("bpf: verifier: add checks for BPF_ABS | BPF_IND instructions")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/verifier.c