net: filter: fix upper BPF instruction limit
authorKees Cook <[email protected]>
Wed, 18 Jun 2014 22:34:57 +0000 (15:34 -0700)
committerDavid S. Miller <[email protected]>
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 <[email protected]>
Cc: [email protected] # v3.15+
Acked-by: Daniel Borkmann <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/core/filter.c