net: filter: fix upper BPF instruction limit
authorKees Cook <keescook@chromium.org>
Wed, 18 Jun 2014 22:34:57 +0000 (15:34 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Jun 2014 00:04:15 +0000 (17:04 -0700)
commit6f9a093b66ce7cacc110d8737c03686e80ecfda6
tree5a53f18d497fc955d613e8aa1d6aee50a5e47fa8
parentff5e92c1affe7166b3f6e7073e648ed65a6e2e59
net: filter: fix upper BPF instruction limit

The original checks (via sk_chk_filter) for instruction count uses ">",
not ">=", so changing this in sk_convert_filter has the potential to break
existing seccomp filters that used exactly BPF_MAXINSNS many instructions.

Fixes: bd4cf0ed331a ("net: filter: rework/optimize internal BPF interpreter's instruction set")
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org # v3.15+
Acked-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/filter.c