Skip to content

Netfilter fixes for net

Pablo Neira Ayuso netdev netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11netfilter: x_tables: make allocation less aggressivenet/netfilter/x_tables.c+6 -10 replies
2/11netfilter: ipv6: nf_defrag: Kill frag queue on RFC2460 failurenet/ipv6/netfilter/nf_conntrack_reasm.c+1 -00 replies
3/11netfilter: flowtable infrastructure depends on NETFILTER_INGRESSnet/ipv4/netfilter/Kconfig net/ipv6/netfilter/Kconfig net/netfilter/Kconfig+7 -70 replies
4/11netfilter: xt_cgroup: initialize info->priv in cgroup_mt_check_v1()net/netfilter/xt_cgroup.c+1 -00 replies
5/11netfilter: nft_flow_offload: wait for garbage collector to run after cleanupnet/netfilter/nf_tables_api.c net/netfilter/nft_flow_offload.c+5 -40 replies
6/11netfilter: nft_flow_offload: no need to flush entries on module removalnet/netfilter/nft_flow_offload.c+0 -60 replies
7/11netfilter: xt_RATEEST: acquire xt_rateest_mutex for hash insertnet/netfilter/xt_RATEEST.c+17 -50 replies
8/11netfilter: nft_flow_offload: move flowtable cleanup routines to nf_flow_tableinclude/net/netfilter/nf_flow_table.h net/netfilter/nf_flow_table.c net/netfilter/nft_flow_offload.c+28 -180 replies
9/11netfilter: nf_tables: fix flowtable freeinclude/net/netfilter/nf_flow_table.h net/ipv4/netfilter/nf_flow_table_ipv4.c net/ipv6/netfilter/nf_flow_table_ipv6.c +3 more+26 -130 replies
10/11netfilter: remove useless prototypeinclude/net/netfilter/nf_conntrack.h+0 -50 replies
11/11netfilter: nf_flow_offload: fix use-after-free and a resource leakinclude/net/netfilter/nf_flow_table.h net/netfilter/nf_flow_table.c+7 -210 replies

Reviews trailers per patch

2 of 11 patches have a Reviewed-by or Acked-by.

PatchFlorian WestphalAndrew MortonEric Dumazet
1/11A-b R-b
2/11
3/11
4/11
5/11
6/11
7/11R-b R-b
8/11
9/11
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 00/11] Netfilter fixes for net

Hi David,

The following patchset contains Netfilter fixes for you net tree, they are:

1) Restore __GFP_NORETRY in xt_table allocations to mitigate effects of large memory allocation requests, from Michal Hocko.

2) Release IPv6 fragment queue in case of error in fragmentation header, this is a follow up to amend patch 83f1999caeb1, from Subash Abhinov Kasiviswanathan.

3) Flowtable infrastructure depends on NETFILTER_INGRESS as it registers a hook for each flowtable, reported by John Crispin.

4) Missing initialization of info->priv in xt_cgroup version 1, from Cong Wang.

5) Give a chance to garbage collector to run after scheduling flowtable cleanup.

6) Releasing flowtable content on nft_flow_offload module removal is not required at all, there is not dependencies between this module and flowtables, remove it.

7) Fix missing xt_rateest_mutex grabbing for hash insertions, also from Cong Wang.

8) Move nf_flow_table_cleanup() routine to flowtable core, this patch is a dependency for the next patch in this list.

9) Flowtable resources are not properly released on removal from the control plane. Fix this resource leak by scheduling removal of all entries and explicit call to the garbage collector.

10) nf_ct_nat_offset() declaration is dead code, this function prototype is not used anywhere, remove it. From Taehee Yoo.

11) Fix another flowtable resource leak on entry insertion failures, this patch also fixes a possible use-after-free. Patch from Felix Fietkau.

You can pull these changes from:

git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git

Thanks!

P.S: Again more fixes cooking on [email protected], so
another round is likely coming up soon.

----------------------------------------------------------------

The following changes since commit 743ffffefac1c670c6618742c923f6275d819604:

net: pxa168_eth: add netconsole support (2018-02-01 14:58:37 -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 0ff90b6c20340e57616a51ae1a1bf18156d6638a:

netfilter: nf_flow_offload: fix use-after-free and a resource leak (2018-02-07 11:55:52 +0100)

----------------------------------------------------------------
Cong Wang (2):
netfilter: xt_cgroup: initialize info->priv in cgroup_mt_check_v1()
netfilter: xt_RATEEST: acquire xt_rateest_mutex for hash insert

Felix Fietkau (1):
netfilter: nf_flow_offload: fix use-after-free and a resource leak

Michal Hocko (1):
netfilter: x_tables: make allocation less aggressive

Pablo Neira Ayuso (5):
netfilter: flowtable infrastructure depends on NETFILTER_INGRESS
netfilter: nft_flow_offload: wait for garbage collector to run after cleanup
netfilter: nft_flow_offload: no need to flush entries on module removal
netfilter: nft_flow_offload: move flowtable cleanup routines to nf_flow_table
netfilter: nf_tables: fix flowtable free

Subash Abhinov Kasiviswanathan (1):
netfilter: ipv6: nf_defrag: Kill frag queue on RFC2460 failure

Taehee Yoo (1):
netfilter: remove useless prototype

 include/net/netfilter/nf_conntrack.h    |  5 ---
 include/net/netfilter/nf_flow_table.h   |  6 ++-
 net/ipv4/netfilter/Kconfig              |  3 +-
 net/ipv4/netfilter/nf_flow_table_ipv4.c |  1 +
 net/ipv6/netfilter/Kconfig              |  3 +-
 net/ipv6/netfilter/nf_conntrack_reasm.c |  1 +
 net/ipv6/netfilter/nf_flow_table_ipv6.c |  1 +
 net/netfilter/Kconfig                   |  8 ++--
 net/netfilter/nf_flow_table.c           | 76 ++++++++++++++++++++++-----------
 net/netfilter/nf_flow_table_inet.c      |  1 +
 net/netfilter/nf_tables_api.c           | 17 +++-----
 net/netfilter/nft_flow_offload.c        | 24 +----------
 net/netfilter/x_tables.c                |  7 ++-
 net/netfilter/xt_RATEEST.c              | 22 +++++++---
 net/netfilter/xt_cgroup.c               |  1 +
 15 files changed, 97 insertions(+), 79 deletions(-)