diff --git a/patches/backports/0037-backport-5.4-add-a-BPF-off-by-one-fix.patch b/patches/backports/0037-backport-5.4-add-a-BPF-off-by-one-fix.patch new file mode 100644 index 000000000..9875010ed --- /dev/null +++ b/patches/backports/0037-backport-5.4-add-a-BPF-off-by-one-fix.patch @@ -0,0 +1,33 @@ +From 1ac3763815e804eacc0977afb420f015a78f8d72 Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Fri, 23 Sep 2022 08:48:38 +0200 +Subject: [PATCH] backport-5.4: add a BPF off-by-one fix + +Signed-off-by: John Crispin +--- + .../backport-5.4/999-bpf-off-by-one-backport.patch | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + create mode 100644 target/linux/generic/backport-5.4/999-bpf-off-by-one-backport.patch + +diff --git a/target/linux/generic/backport-5.4/999-bpf-off-by-one-backport.patch b/target/linux/generic/backport-5.4/999-bpf-off-by-one-backport.patch +new file mode 100644 +index 0000000000..271eac67da +--- /dev/null ++++ b/target/linux/generic/backport-5.4/999-bpf-off-by-one-backport.patch +@@ -0,0 +1,13 @@ ++Index: linux-5.4.158/kernel/bpf/verifier.c ++=================================================================== ++--- linux-5.4.158.orig/kernel/bpf/verifier.c +++++ linux-5.4.158/kernel/bpf/verifier.c ++@@ -5372,7 +5372,7 @@ static void find_good_pkt_pointers(struc ++ ++ new_range = dst_reg->off; ++ if (range_right_open) ++- new_range--; +++ new_range++; ++ ++ /* Examples for register markings: ++ * +-- +2.25.1 +