Skip to content

Netfilter fixes for net

Pablo Neira Ayuso netdev netfilter-devel 1 version Applied

Status from this message: This series was applied to netdev/net.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 0 repliesApplied 8/8

Patches in v1 All 8 applied

#Subject and filesSizeRepliesApplied
1/8netfilter: nf_tables: prefer kfree_rcu(ptr, rcu) variantnet/netfilter/nf_tables_api.c+2 -20 repliesApplied
2/8netfilter: fix use-after-free in __nf_register_net_hook()net/netfilter/core.c+3 -20 repliesApplied
3/8netfilter: egress: silence egress hook lockdep splatsinclude/linux/netfilter_netdev.h+4 -00 repliesApplied
4/8netfilter: nf_queue: don't assume sk is full socketnet/netfilter/nf_queue.c+10 -10 repliesApplied
5/8selftests: netfilter: add nfqueue TCP_NEW_SYN_RECV socket race testtools/testing/selftests/netfilter/.gitignore tools/testing/selftests/netfilter/Makefile tools/testing/selftests/netfilter/connect_close.c +1 more+157 -10 repliesApplied
6/8netfilter: nf_queue: fix possible use-after-freeinclude/net/netfilter/nf_queue.h net/netfilter/nf_queue.c net/netfilter/nfnetlink_queue.c+19 -80 repliesApplied
7/8netfilter: nf_queue: handle socket prefetchnet/netfilter/nf_queue.c+12 -00 repliesApplied
8/8net/sched: act_ct: Fix flow table lookup failure with no originating ifindexinclude/net/netfilter/nf_flow_table.h net/netfilter/nf_flow_table_offload.c net/sched/act_ct.c+19 -60 repliesApplied

Reviews trailers per patch

4 of 8 patches have a Reviewed-by or Acked-by.

PatchFlorian WestphalOleksandr NatalenkoEric DumazetJoe Stringer
1/8R-b
2/8A-b
3/8
4/8T-b
5/8
6/8R-b
7/8A-b
8/8

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 net 0/8] Netfilter fixes for net

Hi,

The following patchset contains Netfilter fixes for net:

1) Use kfree_rcu(ptr, rcu) variant, using kfree_rcu(ptr) was not intentional. From Eric Dumazet.

2) Use-after-free in netfilter hook core, from Eric Dumazet.

3) Missing rcu read lock side for netfilter egress hook, from Florian Westphal.

4) nf_queue assume state->sk is full socket while it might not be. Invoke sock_gen_put(), from Florian Westphal.

5) Add selftest to exercise the reported KASAN splat in 4)

6) Fix possible use-after-free in nf_queue in case sk_refcnt is 0. Also from Florian.

7) Use input interface index only for hardware offload, not for the software plane. This breaks tc ct action. Patch from Paul Blakey.

Please, pull these changes from:

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

Thanks.

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

The following changes since commit 277f2bb14361790a70e4b3c649e794b75a91a597:

ibmvnic: schedule failover only if vioctl fails (2022-02-22 17:06:27 -0800)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git HEAD

for you to fetch changes up to db6140e5e35a48405e669353bd54042c1d4c3841:

net/sched: act_ct: Fix flow table lookup failure with no originating ifindex (2022-03-01 22:08:31 +0100)

----------------------------------------------------------------
Eric Dumazet (2):
netfilter: nf_tables: prefer kfree_rcu(ptr, rcu) variant
netfilter: fix use-after-free in __nf_register_net_hook()

Florian Westphal (5):
netfilter: egress: silence egress hook lockdep splats
netfilter: nf_queue: don't assume sk is full socket
selftests: netfilter: add nfqueue TCP_NEW_SYN_RECV socket race test
netfilter: nf_queue: fix possible use-after-free
netfilter: nf_queue: handle socket prefetch

Paul Blakey (1):
net/sched: act_ct: Fix flow table lookup failure with no originating ifindex

 include/linux/netfilter_netdev.h                  |   4 +
 include/net/netfilter/nf_flow_table.h             |   6 +-
 include/net/netfilter/nf_queue.h                  |   2 +-
 net/netfilter/core.c                              |   5 +-
 net/netfilter/nf_flow_table_offload.c             |   6 +-
 net/netfilter/nf_queue.c                          |  36 +++++-
 net/netfilter/nf_tables_api.c                     |   4 +-
 net/netfilter/nfnetlink_queue.c                   |  12 +-
 net/sched/act_ct.c                                |  13 ++-
 tools/testing/selftests/netfilter/.gitignore      |   1 +
 tools/testing/selftests/netfilter/Makefile        |   2 +-
 tools/testing/selftests/netfilter/connect_close.c | 136 ++++++++++++++++++++++
 tools/testing/selftests/netfilter/nft_queue.sh    |  19 +++
 13 files changed, 226 insertions(+), 20 deletions(-)
 create mode 100644 tools/testing/selftests/netfilter/connect_close.c