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

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14netfilter: conntrack: prevent helper extension relocationnet/netfilter/nf_conntrack_extend.c+21 -101 reply
2/14netfilter: xt_IDLETIMER: restrict to init_netnet/netfilter/xt_IDLETIMER.c+7 -00 replies
3/14netfilter: synproxy: prevent unbounded recursion in transmit pathnet/netfilter/nf_synproxy_core.c+19 -00 replies
4/14netfilter: conntrack: wait for RCU readers before freeing the hashnet/netfilter/nf_conntrack_core.c+1 -00 replies
5/14netfilter: conntrack: attach generated TCP resets as ESTABLISHEDinclude/linux/netfilter.h net/ipv4/icmp.c net/ipv4/netfilter/nf_reject_ipv4.c +4 more+32 -150 replies
6/14netfilter: nf_conntrack: limit expectation master chain depthinclude/net/netfilter/nf_conntrack_helper.h net/netfilter/nf_conntrack_expect.c net/netfilter/nf_conntrack_netlink.c+53 -130 replies
7/14netfilter: conntrack: skip unconfirmed entries in /proc/net/nf_conntracknet/netfilter/nf_conntrack_standalone.c+3 -00 replies
8/14netfilter: bridge: detach conntrack template on invalid IP framesnet/bridge/netfilter/nf_conntrack_bridge.c+10 -60 replies
9/14netfilter: synproxy: fix double tsoff application in server ACK TSecrnet/netfilter/nf_synproxy_core.c+16 -40 replies
10/14netfilter: nf_tables: only disable tables on a dormant transitionnet/netfilter/nf_tables_api.c+1 -10 replies
11/14netfilter: nf_tables: add NFT_HOOK_UNREGISTERED and use itinclude/net/netfilter/nf_tables.h net/netfilter/nf_tables_api.c net/netfilter/nft_chain_filter.c+31 -310 replies
12/14netfilter: nf_tables: unbind flowtable on hook releasenet/netfilter/nf_tables_api.c+47 -180 replies
13/14netfilter: nf_tables: flush destroy work from flowtable netdev event handlernet/netfilter/nf_tables_api.c+2 -00 replies
14/14netfilter: ipv6: stop the conntrack fragment search at AHnet/ipv6/netfilter/nf_conntrack_reasm.c+3 -60 replies

Reviews trailers per patch

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

PatchFlorian WestphalDominik Shaim UlrichXuanqiang Luo
1/14
2/14
3/14
4/14
5/14
6/14
7/14
8/14A-b
9/14Reported-and-tested-by
10/14R-b
11/14
12/14
13/14
14/14

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 net 00/14] Netfilter fixes for net

The following patchset contains Netfilter fixes for net, mostly LLM findings are usual these days, unless stated otherwise:

1) Allocate all ct extensions if ct helper extension is used, this is needed because ct extension reallocation is possible while expectations are already sitting in the expectation list. From Jaeyeong Lee.

2) Restrict xt_IDLETIMER to init_netns. This xtables extensions exposes a global sysfs interface. Follow ups are possible to restore this feature if someone proves to be using this extension from netns. From Zhiling Zou.

3) Prevent an unbound recursion in the synproxy transmit path. This is similar to a recent fix to address a similar recursion in the reject transmit path. Patch from Fernando F. Mancera.

4) On conntrack module removal, wait for RCU quiescent state to address possible use-after-free. From Chengfeng Ye.

5) Set IP_CT_ESTABLISHED state to TCP reject skbuffs to address a warning splat in the NAT infrastructure. From xujiahao.

6) Restrict maximum number of chain of master conntracks to 8 when allocating a new expectation. This is to address a recursion in the conntrack destroy path leading to stack overflow. From Florian Westphal.

7) Skip recycled unconfirmed conntracks seen from /proc/net/nf_conntrack due to TYPESAFE_RCU, otherwise access to ct extension of this new unconfirmed conntrack results in a crash. from Yiran Qiu.

8) Detach ct template in conntrack bridge when packet is invalid, otherwise ct template is exposed to follow up hooks in the pipeline. From Luxiao Xu.

9) In synproxy, fix incorrect handshake ACK sent to the backend carries a TSecr uncovered since commit 3ba075278c11 ("tcp: be less liberal in TSEcr received while in SYN_RECV state"). This bug has been reported in production. Patch from Florian Westphal.

10) Disable hook for dormant table only if transition to dormant state took place in this transaction. From Ma Xinmen.

11) Add unregister flag for hooks as a dependency to fix a regression in the follow up patch in this series.

12) Unbind flowtable flow_block when hook are released, otherwise, flowtable entries in hardware are not released when the flowtable is destroyed. This regression has been observed in production.

13) Flush pending nf_tables destroy work before handling the flowtable event to address a race between flowtable events and the destroy worker.

14) Update conntrack defrag to stop at the legacy AH protocol header, just like 568af6de058c ("netfilter: nf_tables: set pktinfo->thoff at AH header if found"). Fragment header before AH is still possible. This addresses a hypothetical policy bypass. The AH protocol is deprecated since 2017, noone should be using it.

Please, pull these changes from:

git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git nf-26-11-29

Thanks.

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

The following changes since commit e1055cbfd6eb578417f3ce983cf44462e8465267:

Merge tag 'linux-can-fixes-for-7.4-20261124' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can (2026-11-26 15:47:14 +0100)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git nf-26-11-29

for you to fetch changes up to 88fe9e22aa1f37150e2057d8d9dd4c979196be11:

netfilter: ipv6: stop the conntrack fragment search at AH (2026-11-29 00:40:27 +0100)

----------------------------------------------------------------
netfilter pull request 26-11-29

----------------------------------------------------------------
Chengfeng Ye (1):
netfilter: conntrack: wait for RCU readers before freeing the hash

Fernando Fernandez Mancera (1):
netfilter: synproxy: prevent unbounded recursion in transmit path

Florian Westphal (2):
netfilter: nf_conntrack: limit expectation master chain depth
netfilter: synproxy: fix double tsoff application in server ACK TSecr

Jaeyeong Lee (1):
netfilter: conntrack: prevent helper extension relocation

Luxiao Xu (1):
netfilter: bridge: detach conntrack template on invalid IP frames

Ma Xinmeng (1):
netfilter: nf_tables: only disable tables on a dormant transition

Pablo Neira Ayuso (3):
netfilter: nf_tables: add NFT_HOOK_UNREGISTERED and use it
netfilter: nf_tables: unbind flowtable on hook release
netfilter: nf_tables: flush destroy work from flowtable netdev event handler

Ryosuke Iwahashi (1):
netfilter: ipv6: stop the conntrack fragment search at AH

Yiran Qiu (1):
netfilter: conntrack: skip unconfirmed entries in /proc/net/nf_conntrack

Zhiling Zou (1):
netfilter: xt_IDLETIMER: restrict to init_net

xujiahao (1):
netfilter: conntrack: attach generated TCP resets as ESTABLISHED

 include/linux/netfilter.h                   |   8 +-
 include/net/netfilter/nf_conntrack_helper.h |  15 ++++
 include/net/netfilter/nf_tables.h           |   3 +-
 net/bridge/netfilter/nf_conntrack_bridge.c  |  16 ++--
 net/ipv4/icmp.c                             |   2 +-
 net/ipv4/netfilter/nf_reject_ipv4.c         |   2 +-
 net/ipv6/icmp.c                             |   2 +-
 net/ipv6/netfilter/nf_conntrack_reasm.c     |   9 +--
 net/ipv6/netfilter/nf_reject_ipv6.c         |   2 +-
 net/netfilter/core.c                        |   4 +-
 net/netfilter/nf_conntrack_core.c           |  28 +++++--
 net/netfilter/nf_conntrack_expect.c         |  15 +++-
 net/netfilter/nf_conntrack_extend.c         |  31 +++++---
 net/netfilter/nf_conntrack_netlink.c        |  36 ++++++---
 net/netfilter/nf_conntrack_standalone.c     |   3 +
 net/netfilter/nf_synproxy_core.c            |  39 +++++++++-
 net/netfilter/nf_tables_api.c               | 114 +++++++++++++++++-----------
 net/netfilter/nft_chain_filter.c            |   6 +-
 net/netfilter/xt_IDLETIMER.c                |   7 ++
 19 files changed, 242 insertions(+), 100 deletions(-)