This is a note to let you know that I've just added the patch titled net: filter: fix upper BPF instruction limit to the 3.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-filter-fix-upper-bpf-instruction-limit.patch and it can be found in the queue-3.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Sat Jul 26 10:16:13 PDT 2014 From: Kees Cook <keescook@xxxxxxxxxxxx> Date: Wed, 18 Jun 2014 15:34:57 -0700 Subject: net: filter: fix upper BPF instruction limit From: Kees Cook <keescook@xxxxxxxxxxxx> [ Upstream commit 6f9a093b66ce7cacc110d8737c03686e80ecfda6 ] 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@xxxxxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx # v3.15+ Acked-by: Daniel Borkmann <dborkman@xxxxxxxxxx> Acked-by: Alexei Starovoitov <ast@xxxxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- net/core/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/core/filter.c +++ b/net/core/filter.c @@ -872,7 +872,7 @@ int sk_convert_filter(struct sock_filter BUILD_BUG_ON(BPF_MEMWORDS * sizeof(u32) > MAX_BPF_STACK); BUILD_BUG_ON(FP_REG + 1 != MAX_BPF_REG); - if (len <= 0 || len >= BPF_MAXINSNS) + if (len <= 0 || len > BPF_MAXINSNS) return -EINVAL; if (new_prog) { Patches currently in stable-queue which might be from keescook@xxxxxxxxxxxx are queue-3.15/net-filter-fix-upper-bpf-instruction-limit.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html