WSL2-Linux-Kernel/net/ipv4/netfilter
Pavel Emelyanov a8ddc9163c netfilter: ipt_recent: fix race between recent_mt_destroy and proc manipulations
The thing is that recent_mt_destroy first flushes the entries
from table with the recent_table_flush and only *after* this
removes the proc file, corresponding to that table.

Thus, if we manage to write to this file the '+XXX' command we
will leak some entries. If we manage to write there a 'clean'
command we'll race in two recent_table_flush flows, since the
recent_mt_destroy calls this outside the recent_lock.

The proper solution as I see it is to remove the proc file first
and then go on with flushing the table. This flushing becomes
safe w/o the lock, since the table is already inaccessible from
the outside.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31 00:38:31 -07:00
..
Kconfig netfilter: make security table depend on NETFILTER_ADVANCED 2008-07-23 16:42:42 -07:00
Makefile netfilter: ip_tables: add iptables security table for mandatory access control rules 2008-06-09 15:57:24 -07:00
arp_tables.c [NETFILTER]: {ip,ip6,arp}_tables: return EAGAIN for invalid SO_GET_ENTRIES size 2008-04-14 11:15:45 +02:00
arpt_mangle.c [NETFILTER]: remove arpt_(un)register_target indirection macros 2008-04-14 11:15:44 +02:00
arptable_filter.c netfilter: arptables in netns for real 2008-07-26 17:48:59 -07:00
ip_queue.c netns: Use net_eq() to compare net-namespaces for optimization. 2008-07-19 22:34:43 -07:00
ip_tables.c [NETFILTER]: {ip,ip6,arp}_tables: return EAGAIN for invalid SO_GET_ENTRIES size 2008-04-14 11:15:45 +02:00
ipt_CLUSTERIP.c net: use the common ascii hex helpers 2008-07-30 16:30:15 -07:00
ipt_ECN.c [NETFILTER]: annotate xtables targets with const and remove casts 2008-04-14 09:56:05 +02:00
ipt_LOG.c [NETFILTER]: annotate xtables targets with const and remove casts 2008-04-14 09:56:05 +02:00
ipt_MASQUERADE.c netns: Use net_eq() to compare net-namespaces for optimization. 2008-07-19 22:34:43 -07:00
ipt_NETMAP.c [NETFILTER]: Update modules' descriptions 2008-01-28 15:02:26 -08:00
ipt_REDIRECT.c [NETFILTER]: Update modules' descriptions 2008-01-28 15:02:26 -08:00
ipt_REJECT.c [NETFILTER]: annotate xtables targets with const and remove casts 2008-04-14 09:56:05 +02:00
ipt_TTL.c [NETFILTER]: Update modules' descriptions 2008-01-28 15:02:26 -08:00
ipt_ULOG.c [NETNS]: Consolidate kernel netlink socket destruction. 2008-01-28 15:08:07 -08:00
ipt_addrtype.c [NETFILTER]: Update modules' descriptions 2008-01-28 15:02:26 -08:00
ipt_ah.c [NETFILTER]: Update modules' descriptions 2008-01-28 15:02:26 -08:00
ipt_ecn.c [NETFILTER]: Update modules' descriptions 2008-01-28 15:02:26 -08:00
ipt_recent.c netfilter: ipt_recent: fix race between recent_mt_destroy and proc manipulations 2008-07-31 00:38:31 -07:00
ipt_ttl.c [NETFILTER]: Update modules' descriptions 2008-01-28 15:02:26 -08:00
iptable_filter.c [NETFILTER]: Use non-deprecated __RW_LOCK_UNLOCKED macro 2008-04-14 09:56:03 +02:00
iptable_mangle.c [NETFILTER]: Use non-deprecated __RW_LOCK_UNLOCKED macro 2008-04-14 09:56:03 +02:00
iptable_raw.c [NETFILTER]: Use non-deprecated __RW_LOCK_UNLOCKED macro 2008-04-14 09:56:03 +02:00
iptable_security.c netfilter: ip{,6}tables_security: fix future section mismatch 2008-07-26 17:48:38 -07:00
nf_conntrack_l3proto_ipv4.c netfilter: nf_conntrack: padding breaks conntrack hash on ARM 2008-04-29 03:35:10 -07:00
nf_conntrack_l3proto_ipv4_compat.c netfilter: accounting rework: ct_extend + 64bit counters (v4) 2008-07-21 10:10:58 -07:00
nf_conntrack_proto_icmp.c netfilter: nf_conntrack: properly account terminating packets 2008-06-09 15:59:40 -07:00
nf_nat_amanda.c [NETFILTER]: remove unneeded rcu_dereference() calls 2007-11-07 04:08:23 -08:00
nf_nat_core.c netfilter: nf_nat_core: eliminate useless find_appropriate_src for IP_NAT_RANGE_PROTO_RANDOM 2008-07-21 10:10:57 -07:00
nf_nat_ftp.c [NETFILTER]: remove unneeded rcu_dereference() calls 2007-11-07 04:08:23 -08:00
nf_nat_h323.c [NETFILTER]: nf_conntrack_h323: constify and annotate H.323 helper 2008-01-31 19:28:07 -08:00
nf_nat_helper.c [NETFILTER]: nf_nat: kill helper and seq_adjust hooks 2008-04-14 11:15:52 +02:00
nf_nat_irc.c [NETFILTER]: remove unneeded rcu_dereference() calls 2007-11-07 04:08:23 -08:00
nf_nat_pptp.c [NETFILTER]: nf_conntrack: replace NF_CT_DUMP_TUPLE macro indrection by function call 2008-04-14 11:15:54 +02:00
nf_nat_proto_common.c [NETFILTER]: nf_nat: use bool type in nf_nat_proto 2008-04-14 11:15:53 +02:00
nf_nat_proto_dccp.c [NETFILTER]: nf_conntrack: const annotations in nf_conntrack_sctp, nf_nat_proto_gre 2008-04-14 11:15:54 +02:00
nf_nat_proto_gre.c [NETFILTER]: nf_conntrack: const annotations in nf_conntrack_sctp, nf_nat_proto_gre 2008-04-14 11:15:54 +02:00
nf_nat_proto_icmp.c [NETFILTER]: nf_nat: use bool type in nf_nat_proto 2008-04-14 11:15:53 +02:00
nf_nat_proto_sctp.c sctp: remove unnecessary byteshifting, calculate directly in big-endian 2008-07-18 23:07:09 -07:00
nf_nat_proto_tcp.c [NETFILTER]: nf_nat: use bool type in nf_nat_proto 2008-04-14 11:15:53 +02:00
nf_nat_proto_udp.c [NETFILTER]: nf_nat: use bool type in nf_nat_proto 2008-04-14 11:15:53 +02:00
nf_nat_proto_udplite.c [NETFILTER]: nf_nat: use bool type in nf_nat_proto 2008-04-14 11:15:53 +02:00
nf_nat_proto_unknown.c [NETFILTER]: nf_nat: use bool type in nf_nat_proto 2008-04-14 11:15:53 +02:00
nf_nat_rule.c [NETFILTER]: nf_nat: don't add NAT extension for confirmed conntracks 2008-04-14 11:15:51 +02:00
nf_nat_sip.c netfilter: nf_nat_sip: c= is optional for session 2008-07-21 10:11:02 -07:00
nf_nat_snmp_basic.c netfilter: nf_nat_snmp_basic: fix a range check in NAT for SNMP 2008-07-09 15:06:45 -07:00
nf_nat_standalone.c [NETFILTER]: nf_nat: kill helper and seq_adjust hooks 2008-04-14 11:15:52 +02:00
nf_nat_tftp.c [NETFILTER]: nf_{conntrack,nat}_tftp: annotate TFTP helper with const 2008-01-31 19:28:08 -08:00