diff --git a/net/core/filter.c b/net/core/filter.c index 3e10b4c8338f..7afb7658c388 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -9330,6 +9330,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;