Skip to content

Commit afdb210

Browse files
ummakynesJiri Slaby
authored andcommitted
netfilter: xt_bpf: add mising opaque struct sk_filter definition
commit e10038a upstream. This structure is not exposed to userspace, so fix this by defining struct sk_filter; so we skip the casting in kernelspace. This is safe since userspace has no way to lurk with that internal pointer. Fixes: e6f30c7 ("netfilter: x_tables: add xt_bpf match") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
1 parent 37bdac2 commit afdb210

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎include/uapi/linux/netfilter/xt_bpf.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
#define XT_BPF_MAX_NUM_INSTR 64
88

9+
struct sk_filter;
10+
911
struct xt_bpf_info {
1012
__u16 bpf_program_num_elem;
1113
struct sock_filter bpf_program[XT_BPF_MAX_NUM_INSTR];

0 commit comments

Comments
 (0)