linux-stable/net/ipv6/netfilter
Florian Westphal c568503ef0 netfilter: x_tables: initialise match/target check parameter struct
syzbot reports following splat:

BUG: KMSAN: uninit-value in ebt_stp_mt_check+0x24b/0x450
 net/bridge/netfilter/ebt_stp.c:162
 ebt_stp_mt_check+0x24b/0x450 net/bridge/netfilter/ebt_stp.c:162
 xt_check_match+0x1438/0x1650 net/netfilter/x_tables.c:506
 ebt_check_match net/bridge/netfilter/ebtables.c:372 [inline]
 ebt_check_entry net/bridge/netfilter/ebtables.c:702 [inline]

The uninitialised access is
   xt_mtchk_param->nft_compat

... which should be set to 0.
Fix it by zeroing the struct beforehand, same for tgchk.

ip(6)tables targetinfo uses c99-style initialiser, so no change
needed there.

Reported-by: syzbot+da4494182233c23a5fcf@syzkaller.appspotmail.com
Fixes: 55917a21d0 ("netfilter: x_tables: add context to know if extension runs from nft_compat")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2018-06-08 12:40:56 +02:00
..
ip6_tables.c netfilter: x_tables: initialise match/target check parameter struct 2018-06-08 12:40:56 +02:00
ip6t_ah.c
ip6t_eui64.c
ip6t_frag.c
ip6t_hbh.c
ip6t_ipv6header.c
ip6t_MASQUERADE.c netfilter: ip6t_MASQUERADE: add dependency on conntrack module 2017-12-11 17:04:50 +01:00
ip6t_mh.c
ip6t_NPT.c xtables: extend matches and targets with .usersize 2017-01-09 17:24:55 +01:00
ip6t_REJECT.c netfilter: x_tables: use pr ratelimiting in all remaining spots 2018-02-14 21:05:38 +01:00
ip6t_rpfilter.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-06 01:20:46 -05:00
ip6t_rt.c
ip6t_srh.c netfilter: x_tables: use pr ratelimiting in all remaining spots 2018-02-14 21:05:38 +01:00
ip6t_SYNPROXY.c netfilter: ctnetlink: synproxy support 2018-03-20 14:39:31 +01:00
ip6table_filter.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
ip6table_mangle.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
ip6table_nat.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
ip6table_raw.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
ip6table_security.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
Kconfig netfilter: nf_tables: NAT chain and extensions require NF_TABLES 2018-04-19 12:31:34 +02:00
Makefile netfilter: nf_tables: build-in filter chain type 2018-03-30 11:29:19 +02:00
nf_conntrack_l3proto_ipv6.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
nf_conntrack_proto_icmpv6.c netfilter: conntrack: timeouts can be const 2018-01-08 18:01:02 +01:00
nf_conntrack_reasm.c inet: frags: fix ip6frag_low_thresh boundary 2018-04-04 12:04:59 -04:00
nf_defrag_ipv6_hooks.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
nf_dup_ipv6.c netfilter: kill the fake untracked conntrack objects 2017-04-15 11:47:57 +02:00
nf_flow_table_ipv6.c net: rename skb_gso_validate_mtu -> skb_gso_validate_network_len 2018-03-04 17:49:17 -05:00
nf_log_ipv6.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
nf_nat_l3proto_ipv6.c netfilter: ipv6: fix use-after-free Write in nf_nat_ipv6_manip_pkt 2018-02-25 20:03:54 +01:00
nf_nat_masquerade_ipv6.c net: Replace NF_CT_ASSERT() with WARN_ON(). 2017-09-04 13:25:19 +02:00
nf_nat_proto_icmpv6.c
nf_reject_ipv6.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
nf_socket_ipv6.c netfilter: nf_socket: Fix out of bounds access in nf_sk_lookup_slow_v{4,6} 2018-03-24 21:17:14 +01:00
nft_chain_nat_ipv6.c netfilter: nf_tables: enable conntrack if NAT chain is registered 2018-03-30 11:29:19 +02:00
nft_chain_route_ipv6.c netfilter: nf_tables: nft_register_chain_type() returns void 2018-03-30 11:29:18 +02:00
nft_dup_ipv6.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-11-15 10:54:36 -05:00
nft_fib_ipv6.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-06 01:20:46 -05:00
nft_masq_ipv6.c netfilter: nf_tables: fix mismatch in big-endian system 2017-03-13 13:30:28 +01:00
nft_redir_ipv6.c netfilter: nf_tables: fix mismatch in big-endian system 2017-03-13 13:30:28 +01:00
nft_reject_ipv6.c netfilter: nf_tables: use hook state from xt_action_param structure 2016-11-03 11:52:34 +01:00