Re: [PATCH 0/8] Netfilter fixes for net
From: Pablo Neira AyusoDate: Wed, 29 Mar 2017 14:14:02 +0200 > Hi David, > > The following patchset contains a rather large update with Netfilter > fixes, specifically targeted to incorrect RCU usage in several spots and > the userspace conntrack helper infrastructure (nfnetlink_cthelper), > more specifically they are: ... > You can pull these changes from: > > git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git Pulled, thanks Pablo.
[PATCH 0/8] Netfilter fixes for net
Hi David, The following patchset contains a rather large update with Netfilter fixes, specifically targeted to incorrect RCU usage in several spots and the userspace conntrack helper infrastructure (nfnetlink_cthelper), more specifically they are: 1) expect_class_max is incorrect set via cthelper, as in kernel semantics mandate that this represents the array of expectation classes minus 1. Patch from Liping Zhang. 2) Expectation policy updates via cthelper are currently broken for several reasons: This code allows illegal changes in the policy such as changing the number of expeciation classes, it is leaking the updated policy and such update occurs with no RCU protection at all. Fix this by adding a new nfnl_cthelper_update_policy() that describes what is really legal on the update path. 3) Fix several memory leaks in cthelper, from Jeffy Chen. 4) synchronize_rcu() is missing in the removal path of several modules, this may lead to races since CPU may still be running on code that has just gone. Also from Liping Zhang. 5) Don't use the helper hashtable from cthelper, it is not safe to walk over those bits without the helper mutex. Fix this by introducing a new independent list for userspace helpers. From Liping Zhang. 6) nf_ct_extend_unregister() needs synchronize_rcu() to make sure no packets are walking on any conntrack extension that is gone after module removal, again from Liping. 7) nf_nat_snmp may crash if we fail to unregister the helper due to accidental leftover code, from Gao Feng. 8) Fix leak in nfnetlink_queue with secctx support, from Liping Zhang. You can pull these changes from: git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git Thanks! The following changes since commit db7f00b8dba6d687b6ab1f2e9309acfd214fcb4b: tcp: tcp_get_info() should read tcp_time_stamp later (2017-03-16 21:37:13 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git HEAD for you to fetch changes up to 77c1c03c5b8ef28e55bb0aff29b1e006037ca645: netfilter: nfnetlink_queue: fix secctx memory leak (2017-03-29 12:20:50 +0200) Gao Feng (1): netfilter: nf_nat_snmp: Fix panic when snmp_trap_helper fails to register Jeffy Chen (1): netfilter: nfnl_cthelper: Fix memory leak Liping Zhang (5): netfilter: nfnl_cthelper: fix incorrect helper->expect_class_max netfilter: invoke synchronize_rcu after set the _hook_ to NULL netfilter: nfnl_cthelper: fix a race when walk the nf_ct_helper_hash table netfilter: nf_ct_ext: fix possible panic after nf_ct_extend_unregister netfilter: nfnetlink_queue: fix secctx memory leak Pablo Neira Ayuso (1): netfilter: nfnl_cthelper: fix runtime expectation policy updates net/ipv4/netfilter/nf_nat_snmp_basic.c | 20 +-- net/netfilter/nf_conntrack_ecache.c| 2 + net/netfilter/nf_conntrack_extend.c| 13 +- net/netfilter/nf_conntrack_netlink.c | 1 + net/netfilter/nf_nat_core.c| 2 + net/netfilter/nfnetlink_cthelper.c | 287 + net/netfilter/nfnetlink_cttimeout.c| 2 +- net/netfilter/nfnetlink_queue.c| 9 +- 8 files changed, 206 insertions(+), 130 deletions(-)
Re: [PATCH 0/8] Netfilter fixes for net
From: Pablo Neira AyusoDate: Thu, 23 Feb 2017 12:14:01 +0100 > The following patchset contains Netfilter fixes for your net tree, > they are: ... > You can pull these changes from: > > git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git Pulled, thanks a lot!
[PATCH 0/8] Netfilter fixes for net
Hi David, The following patchset contains Netfilter fixes for your net tree, they are: 1) Revisit warning logic when not applying default helper assignment. Jiri Kosina considers we are breaking existing setups and not warning our users accordinly now that automatic helper assignment has been turned off by default. So let's make him happy by spotting the warning by when we find a helper but we cannot attach, instead of warning on the former deprecated behaviour. Patch from Jiri Kosina. 2) Two patches to fix regression in ctnetlink interfaces with nfnetlink_queue. Specifically, perform more relaxed in CTA_STATUS and do not bail out if CTA_HELP indicates the same helper that we already have. Patches from Kevin Cernekee. 3) A couple of bugfixes for ipset via Jozsef Kadlecsik. Due to wrong index logic in hash set types and null pointer exception in the list:set type. 4) hashlimit bails out with correct userspace parameters due to wrong arithmetics in the code that avoids "divide by zero" when transforming the userspace timing in milliseconds to token credits. Patch from Alban Browaeys. 5) Fix incorrect NFQA_VLAN_MAX definition, patch from Ken-ichirou MATSUZAWA. 6) Don't not declare nfnetlink batch error list as static, since this may be used by several subsystems at the same time. Patch from Liping Zhang. You can pull these changes from: git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git Thanks! The following changes since commit cafe8df8b9bc9aa3dffa827c1a6757c6cd36f657: net: phy: Fix lack of reference count on PHY driver (2017-02-02 22:59:43 -0500) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git HEAD for you to fetch changes up to 3ef767e5cbd405abfd01339c7e5daaf98e037be2: Merge branch 'master' of git://blackhole.kfki.hu/nf (2017-02-21 14:01:05 +0100) Alban Browaeys (1): netfilter: xt_hashlimit: Fix integer divide round to zero. Jiri Kosina (1): netfilter: nf_ct_helper: warn when not applying default helper assignment Jozsef Kadlecsik (1): Fix bug: sometimes valid entries in hash:* types of sets were evicted Ken-ichirou MATSUZAWA (1): netfilter: nfnetlink_queue: fix NFQA_VLAN_MAX definition Kevin Cernekee (2): netfilter: ctnetlink: Fix regression in CTA_STATUS processing netfilter: ctnetlink: Fix regression in CTA_HELP processing Liping Zhang (1): netfilter: nfnetlink: remove static declaration from err_list Pablo Neira Ayuso (1): Merge branch 'master' of git://blackhole.kfki.hu/nf Vishwanath Pai (1): netfilter: ipset: Null pointer exception in ipset list:set include/uapi/linux/netfilter/nf_conntrack_common.h | 4 ++ include/uapi/linux/netfilter/nfnetlink_queue.h | 2 +- net/netfilter/ipset/ip_set_hash_gen.h | 2 +- net/netfilter/ipset/ip_set_list_set.c | 9 +++-- net/netfilter/nf_conntrack_helper.c| 39 +--- net/netfilter/nf_conntrack_netlink.c | 43 +++--- net/netfilter/nfnetlink.c | 2 +- net/netfilter/xt_hashlimit.c | 25 + 8 files changed, 86 insertions(+), 40 deletions(-)