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 Latest9 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9netfilter: ipset: fix race condition in ipset save, swap and deleteinclude/linux/netfilter/ipset/ip_set.h net/netfilter/ipset/ip_set_bitmap_gen.h net/netfilter/ipset/ip_set_core.c +2 more+35 -80 replies
2/9openvswitch: Fix checking for new expected connections.net/openvswitch/conntrack.c+3 -20 replies
3/9openvswitch: call only into reachable nf-nat codenet/openvswitch/Kconfig net/openvswitch/conntrack.c+11 -90 replies
4/9netfilter: x_tables: validate e->target_offset earlynet/ipv4/netfilter/arp_tables.c net/ipv4/netfilter/ip_tables.c net/ipv6/netfilter/ip6_tables.c+24 -270 replies
5/9netfilter: x_tables: make sure e->next_offset covers remaining blob sizenet/ipv4/netfilter/arp_tables.c net/ipv4/netfilter/ip_tables.c net/ipv6/netfilter/ip6_tables.c+12 -60 replies
6/9netfilter: x_tables: fix unconditional helpernet/ipv4/netfilter/arp_tables.c net/ipv4/netfilter/ip_tables.c net/ipv6/netfilter/ip6_tables.c+31 -330 replies
7/9netfilter: nfnetlink_queue: honor NFQA_CFG_F_FAIL_OPEN when netlink unicast failsnet/netfilter/nfnetlink_queue.c+6 -10 replies
8/9netfilter: x_tables: enforce nul-terminated table name from getsockopt GET_ENTRIESnet/bridge/netfilter/ebtables.c net/ipv4/netfilter/arp_tables.c net/ipv4/netfilter/ip_tables.c +1 more+10 -00 replies
9/9netfilter: ipv4: fix NULL dereferencenet/bridge/netfilter/nft_reject_bridge.c net/ipv4/netfilter/ipt_SYNPROXY.c+38 -360 replies

Reviews trailers per patch

3 of 9 patches have a Reviewed-by or Acked-by.

PatchJoshua HuntJoe StringerYigal Reiss (yreiss)Nikolay Borisov
1/9R-b
2/9
3/9A-b
4/9
5/9
6/9
7/9T-b
8/9
9/9R-b

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

Read the v1 thread

Cover letter [PATCH 0/9] Netfilter fixes for net

Hi David,

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

1) There was a race condition between parallel save/swap and delete, which resulted a kernel crash due to the increase ref for save, swap, wrong ref decrease operations. Reported and fixed by Vishwanath Pai.

2) OVS should call into CT NAT for packets of new expected connections only when the conntrack state is persisted with the 'commit' option to the OVS CT action. From Jarno Rajahalme.

3) Resolve kconfig dependencies with new OVS NAT support. From Arnd Bergmann.

4) Early validation of entry->target_offset to make sure it doesn't take us out from the blob, from Florian Westphal.

5) Again early validation of entry->next_offset to make sure it doesn't take out from the blob, also from Florian.

6) Check that entry->target_offset is always of of sizeof(struct xt_entry) for unconditional entries, when checking both from check_underflow() and when checking for loops in mark_source_chains(), again from Florian.

7) Fix inconsistent behaviour in nfnetlink_queue when NFQA_CFG_F_FAIL_OPEN is set and netlink_unicast() fails due to buffer overrun, we have to reinject the packet as the user expects.

8) Enforce nul-terminated table names from getsockopt GET_ENTRIES requests.

9) Don't assume skb->sk is set from nft_bridge_reject and synproxy, this fixes a recent update of the code to namespaceify ip_default_ttl, patch from Liping Zhang.

This batch comes with four patches to validate x_tables blobs coming from userspace. CONFIG_USERNS exposes the x_tables interface to unpriviledged users and to be honest this interface never received the attention for this move away from the CAP_NET_ADMIN domain. Florian is working on another round with more patches with more sanity checks, so expect a bit more Netfilter fixes in this development cycle than usual.

You can pull these changes from:

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

Thanks!

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

The following changes since commit d7be81a5916bdb1d904803958e5991a16f7ae4b2:

ravb: fix software timestamping (2016-03-27 22:41:37 -0400)

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 29421198c3a860092e27c2ad8499dfe603398817:

netfilter: ipv4: fix NULL dereference (2016-03-28 17:59:29 +0200)

----------------------------------------------------------------
Arnd Bergmann (1):
openvswitch: call only into reachable nf-nat code

Florian Westphal (3):

      netfilter: x_tables: validate e->target_offset early
      netfilter: x_tables: make sure e->next_offset covers remaining blob size
      netfilter: x_tables: fix unconditional helper

Jarno Rajahalme (1):
openvswitch: Fix checking for new expected connections.

Liping Zhang (1):
netfilter: ipv4: fix NULL dereference

Pablo Neira Ayuso (2):
netfilter: nfnetlink_queue: honor NFQA_CFG_F_FAIL_OPEN when netlink unicast fails
netfilter: x_tables: enforce nul-terminated table name from getsockopt GET_ENTRIES

Vishwanath Pai (1):
netfilter: ipset: fix race condition in ipset save, swap and delete

 include/linux/netfilter/ipset/ip_set.h   |  4 +++
 net/bridge/netfilter/ebtables.c          |  4 +++
 net/bridge/netfilter/nft_reject_bridge.c | 20 ++++++------
 net/ipv4/netfilter/arp_tables.c          | 43 +++++++++++++------------
 net/ipv4/netfilter/ip_tables.c           | 48 ++++++++++++++--------------
 net/ipv4/netfilter/ipt_SYNPROXY.c        | 54 +++++++++++++++++---------------
 net/ipv6/netfilter/ip6_tables.c          | 48 ++++++++++++++--------------
 net/netfilter/ipset/ip_set_bitmap_gen.h  |  2 +-
 net/netfilter/ipset/ip_set_core.c        | 33 ++++++++++++++++---
 net/netfilter/ipset/ip_set_hash_gen.h    |  2 +-
 net/netfilter/ipset/ip_set_list_set.c    |  2 +-
 net/netfilter/nfnetlink_queue.c          |  7 ++++-
 net/openvswitch/Kconfig                  |  4 ++-
 net/openvswitch/conntrack.c              | 21 +++++++------
 14 files changed, 170 insertions(+), 122 deletions(-)