diff --git a/net/core/filter.c b/net/core/filter.c index 169d9ba4e7a0..f346f19cf468 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -8764,6 +8764,9 @@ static bool flow_dissector_is_valid_access(int off, int size, if (off < 0 || off >= sizeof(struct __sk_buff)) return false; + if (off % size != 0) + return false; + if (type == BPF_WRITE) return false;