1086bbe97a
After improving setsockopt() coverage in trinity, I started triggering vmalloc failures pretty reliably from this code path: warn_alloc_failed+0xe9/0x140 __vmalloc_node_range+0x1be/0x270 vzalloc+0x4b/0x50 __do_replace+0x52/0x260 [ip_tables] do_ipt_set_ctl+0x15d/0x1d0 [ip_tables] nf_setsockopt+0x65/0x90 ip_setsockopt+0x61/0xa0 raw_setsockopt+0x16/0x60 sock_common_setsockopt+0x14/0x20 SyS_setsockopt+0x71/0xd0 It turns out we don't validate that the num_counters field in the struct we pass in from userspace is initialized. The same problem also exists in ebtables, arptables, ipv6, and the compat variants. Signed-off-by: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> |
||
---|---|---|
.. | ||
ip6_tables.c | ||
ip6t_ah.c | ||
ip6t_eui64.c | ||
ip6t_frag.c | ||
ip6t_hbh.c | ||
ip6t_ipv6header.c | ||
ip6t_MASQUERADE.c | ||
ip6t_mh.c | ||
ip6t_NPT.c | ||
ip6t_REJECT.c | ||
ip6t_rpfilter.c | ||
ip6t_rt.c | ||
ip6t_SYNPROXY.c | ||
ip6table_filter.c | ||
ip6table_mangle.c | ||
ip6table_nat.c | ||
ip6table_raw.c | ||
ip6table_security.c | ||
Kconfig | ||
Makefile | ||
nf_conntrack_l3proto_ipv6.c | ||
nf_conntrack_proto_icmpv6.c | ||
nf_conntrack_reasm.c | ||
nf_defrag_ipv6_hooks.c | ||
nf_log_ipv6.c | ||
nf_nat_l3proto_ipv6.c | ||
nf_nat_masquerade_ipv6.c | ||
nf_nat_proto_icmpv6.c | ||
nf_reject_ipv6.c | ||
nf_tables_ipv6.c | ||
nft_chain_nat_ipv6.c | ||
nft_chain_route_ipv6.c | ||
nft_masq_ipv6.c | ||
nft_redir_ipv6.c | ||
nft_reject_ipv6.c |