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 (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 0 repliesApplied 10/10

Patches in v1 All 10 applied

#Subject and filesSizeRepliesApplied
1/10netfilter: flowtable: strictly check for maximum number of actionsnet/netfilter/nf_flow_table_offload.c+130 -660 repliesApplied
2/10netfilter: nfnetlink_log: account for netlink header sizenet/netfilter/nfnetlink_log.c+1 -10 repliesApplied
3/10netfilter: x_tables: ensure names are nul-terminatednet/netfilter/xt_cgroup.c net/netfilter/xt_rateest.c+11 -00 repliesApplied
4/10netfilter: ipset: use nla_strcmp for IPSET_ATTR_NAME attrinclude/linux/netfilter/ipset/ip_set.h net/netfilter/ipset/ip_set_core.c net/netfilter/ipset/ip_set_list_set.c+5 -50 repliesApplied
5/10netfilter: nf_conntrack_helper: pass helper to expect cleanupnet/netfilter/nf_conntrack_helper.c+1 -10 repliesApplied
6/10netfilter: ctnetlink: zero expect NAT fields when CTA_EXPECT_NAT absentnet/netfilter/nf_conntrack_netlink.c+6 -00 repliesApplied
7/10netfilter: ctnetlink: ignore explicit helper on new expectationsnet/netfilter/nf_conntrack_netlink.c+9 -450 repliesApplied
8/10netfilter: ipset: drop logically empty buckets in mtype_delnet/netfilter/ipset/ip_set_hash_gen.h+1 -10 repliesApplied
9/10netfilter: x_tables: restrict xt_check_match/xt_check_target extensions for NFPROTO_ARPnet/netfilter/x_tables.c+23 -00 repliesApplied
10/10netfilter: nf_tables: reject immediate NF_QUEUE verdictnet/netfilter/nf_tables_api.c+5 -20 repliesApplied

Reviews trailers per patch

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

PatchPhil Sutter
1/10
2/10
3/10
4/10
5/10R-b
6/10
7/10
8/10R-b
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

Hi,

The following patchset contains Netfilter fixes for net. Note that most of the bugs fixed here are >5 years old. The large PR is not due to an increase in regressions.

1) Flowtable hardware offload support in IPv6 can lead to out-of-bounds when populating the rule action array when combined with double-tagged vlan. Bump the maximum number of actions from 16 to 24 and check that such limit is never reached, otherwise bail out. This bugs stems from the original flowtable hardware offload support.

2) nfnetlink_log does not include the netlink header size of the trailing NLMSG_DONE message when calculating the skb size. From Florian Westphal.

3) Reject names in xt_cgroup and xt_rateest extensions which are not nul-terminated. Also from Florian.

4) Use nla_strcmp in ipset lookup by set name, since IPSET_ATTR_NAME and IPSET_ATTR_NAMEREF are of NLA_STRING type. From Florian Westphal.

5) When unregistering conntrack helpers, pass the helper that is going away so the expectation cleanup is done accordingly, otherwise UaF is possible when accessing expectation that refer to the helper that is gone. From Qi Tang.

6) Zero expectation NAT fields to address leaking kernel memory through the expectation netlink dump when unset. Also from Qi Tang.

7) Use the master conntrack helper when creating expectations via ctnetlink, ignore the suggested helper through CTA_EXPECT_HELP_NAME. This allows to address a possible read of kernel memory off the expectation object boundary.

8) Fix incorrect release of the hash bucket logic in ipset when the bucket is empty, leading to shrinking the hash bucket to size 0 which deals to out-of-bound write in next element additions. From Yifan Wu.

9) Allow the use of x_tables extensions that explicitly declare NFPROTO_ARP support only. This is to avoid an incorrect hook number validation due to non-overlapping arp and inet hook number definitions.

10) Reject immediate NF_QUEUE verdict in nf_tables. The userspace nft tool always uses the nft_queue expression for queueing. This ensures this verdict cannot be used for the arp family, which does supported this.

Please, pull these changes from:

git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git nf-26-04-01

Thanks.

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

The following changes since commit dc9e9d61e301c087bcd990dbf2fa18ad3e2e1429:

Merge branch 'net-enetc-add-more-checks-to-enetc_set_rxfh' (2026-03-27 20:56:49 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git tags/nf-26-04-01

for you to fetch changes up to da107398cbd4bbdb6bffecb2ce86d5c9384f4cec:

netfilter: nf_tables: reject immediate NF_QUEUE verdict (2026-04-01 11:55:30 +0200)

----------------------------------------------------------------
netfilter pull request 26-04-01

----------------------------------------------------------------
Florian Westphal (3):
netfilter: nfnetlink_log: account for netlink header size
netfilter: x_tables: ensure names are nul-terminated
netfilter: ipset: use nla_strcmp for IPSET_ATTR_NAME attr

Pablo Neira Ayuso (4):
netfilter: flowtable: strictly check for maximum number of actions
netfilter: ctnetlink: ignore explicit helper on new expectations
netfilter: x_tables: restrict xt_check_match/xt_check_target extensions for NFPROTO_ARP
netfilter: nf_tables: reject immediate NF_QUEUE verdict

Qi Tang (2):
netfilter: nf_conntrack_helper: pass helper to expect cleanup
netfilter: ctnetlink: zero expect NAT fields when CTA_EXPECT_NAT absent

Yifan Wu (1):
netfilter: ipset: drop logically empty buckets in mtype_del

 include/linux/netfilter/ipset/ip_set.h |   2 +-
 net/netfilter/ipset/ip_set_core.c      |   4 +-
 net/netfilter/ipset/ip_set_hash_gen.h  |   2 +-
 net/netfilter/ipset/ip_set_list_set.c  |   4 +-
 net/netfilter/nf_conntrack_helper.c    |   2 +-
 net/netfilter/nf_conntrack_netlink.c   |  60 +++-------
 net/netfilter/nf_flow_table_offload.c  | 196 ++++++++++++++++++++++-----------
 net/netfilter/nf_tables_api.c          |   7 +-
 net/netfilter/nfnetlink_log.c          |   2 +-
 net/netfilter/x_tables.c               |  23 ++++
 net/netfilter/xt_cgroup.c              |   6 +
 net/netfilter/xt_rateest.c             |   5 +
 12 files changed, 192 insertions(+), 121 deletions(-)