Skip to content

pull request (net): ipsec 2026-12-01

Steffen Klassert netdev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest22 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22xfrm: ipcomp: account full fragment pages in truesizenet/xfrm/xfrm_ipcomp.c+1 -10 replies
2/22xfrm: esp: reset outer TCP GSO metadata on espintcp inputinclude/net/esp.h net/ipv4/esp4.c net/ipv6/esp6.c+69 -00 replies
3/22xfrm: keep the mode module pinned until destroy_state returnsnet/xfrm/xfrm_state.c+7 -10 replies
4/22xfrm: serialize SA activation with state deletionnet/xfrm/xfrm_user.c+2 -00 replies
5/22xfrm: keep old state references until migration deletion completesnet/xfrm/xfrm_policy.c+1 -10 replies
6/22xfrm: hold migrated states through rollbacknet/xfrm/xfrm_policy.c net/xfrm/xfrm_state.c+9 -20 replies
7/22xfrm: check inner family via skb_dst for small_ipv6 DF clearingnet/xfrm/xfrm_output.c+4 -10 replies
8/22xfrm: account XFRMA_MARK in xfrm_sa_len()net/xfrm/xfrm_user.c+2 -10 replies
9/22xfrm: replay: Fix late packet handling with ESN crypto offloadnet/xfrm/xfrm_replay.c+13 -10 replies
10/22xfrm: fix IPv6 first-fragment protocol decodenet/xfrm/xfrm_policy.c+22 -130 replies
11/22xfrm: fix selector matching for IPv6 atomic fragmentsinclude/net/ipv6.h net/ipv6/exthdrs_core.c net/xfrm/xfrm_policy.c+32 -130 replies
12/22xfrm: espintcp: read the socket error queue for MSG_ERRQUEUEnet/xfrm/espintcp.c+3 -00 replies
13/22xfrm: iptfs: force a dst reference before queueing an skbnet/xfrm/xfrm_iptfs.c+7 -00 replies
14/22xfrm: espintcp: select receive path by skb protocolnet/xfrm/espintcp.c+1 -10 replies
15/22net: xfrm: interface: restore dst_orig on every xfrm interfaceinclude/net/xfrm.h net/core/filter.c net/xfrm/xfrm_interface_bpf.c +1 more+20 -310 replies
16/22xfrm: iptfs: make room before copying a continuation in reassemblynet/xfrm/xfrm_iptfs.c+9 -10 replies
17/22xfrm/compat: pass on the translated length of a socket policyinclude/net/xfrm.h net/xfrm/xfrm_compat.c net/xfrm/xfrm_state.c+16 -60 replies
18/22xfrm: Give GC list nodes their own storageinclude/net/xfrm.h net/xfrm/xfrm_state.c+5 -60 replies
19/22xfrm: Serialize device state teardownnet/xfrm/xfrm_device.c net/xfrm/xfrm_state.c+36 -190 replies
20/22xfrm: Wait for an RCU grace period before freeing device statenet/xfrm/xfrm_state.c+3 -10 replies
21/22Revert "xfrm: serialize state GC with device state flush"net/xfrm/xfrm_state.c+0 -50 replies
22/22xfrm: Serialize offload stats updates with x->lockinclude/net/xfrm.h net/xfrm/xfrm_state.c net/xfrm/xfrm_user.c+133 -110 replies

Reviews trailers per patch

7 of 22 patches have a Reviewed-by or Acked-by.

PatchCarolina JubranFernando Fernandez ManceraVictor NogueiraEyal Birger
1/22
2/22
3/22
4/22
5/22
6/22
7/22
8/22
9/22
10/22
11/22
12/22
13/22
14/22
15/22R-b R-b
16/22R-b
17/22
18/22R-b
19/22R-b
20/22R-b
21/22R-b
22/22R-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/22] pull request (net): ipsec 2026-12-01

1) xfrm: ipcomp: account full fragment pages in truesize Charge the decompressed IPComp skb a page-rounded truesize, so the socket memory accounting matches the pages actually attached.

2) xfrm: esp: reset outer TCP GSO metadata on espintcp input Reset the GSO state inherited from the outer TCP stream on ESP-in-TCP input, so a decrypted packet isn't segmented with stale metadata and multi-segment records no longer crash.

3) xfrm: keep the mode module pinned until destroy_state returns Hold an extra module reference across the state destroy callback, so an rmmod racing the state GC can't free the module text while the callback is still running.

4) xfrm: serialize SA activation with state deletion Take the state lock for the final VOID-to-VALID transition, so a hard expiry can't delete the state in between and leave it in the per-CPU cache.

5) xfrm: keep old state references until migration deletion completes Delete the old states before dropping their lookup references, so a concurrent expiry can't free a state the migration still uses.

6) xfrm: hold migrated states through rollback
Keep a caller reference on the successor states and delete them before releasing it, so a failed migration can't touch a state that has already been reclaimed.

7) xfrm: check inner family via skb_dst for small_ipv6 DF clearing Take the inner address family from the dst instead of skb->protocol, so the outer DF bit is cleared for small IPv6 packets and the tunnel doesn't drop them.

8) xfrm: account XFRMA_MARK in xfrm_sa_len()
Count the mark attribute in the SA message length, so the netlink SA notifications are sized correctly.

9) xfrm: replay: Fix late packet handling with ESN crypto offload Drop packets far ahead of the replay window when the ICV check runs in hardware, so a late packet can't corrupt the offloaded ESN state.

10) xfrm: fix IPv6 first-fragment protocol decode
Let the flow dissector walk past an IPv6 fragment header, so the inbound policy lookup sees the real upper-layer protocol.

11) xfrm: fix selector matching for IPv6 atomic fragments Restore the port and protocol selector fields for atomic IPv6 fragments, so such packets can match a policy.

12) xfrm: espintcp: read the socket error queue for MSG_ERRQUEUE Read the error queue through the socket error path, so a queued timestamp is reported instead of being consumed as an IKE message.

13) xfrm: iptfs: force a dst reference before queueing an skb Take a dst reference while the packet is still under RCU, so the deferred IPTFS output doesn't use a dst that may already be gone.

14) xfrm: espintcp: select receive path by skb protocol Pick the receive path from the packet protocol instead of the socket family, so an IPv4 packet on a v4-mapped socket isn't parsed by the IPv6 path.

15) net: xfrm: interface: restore dst_orig on every xfrm interface Restore the original route in both arms of the interface xmit path, so a steered packet finds a policy and the metadata dst is left untouched.

16) xfrm: iptfs: make room before copying a continuation in reassembly Grow the skb head before copying a reassembly continuation, so a larger continuation doesn't overrun the buffer and panic.

17) xfrm/compat: pass on the translated length of a socket policy Pass the translated policy length to the 32-bit compat layer, so the last template isn't dropped and an ESP-required policy doesn't fall back to clear text.

18) xfrm: Give GC list nodes their own storage
Give the GC and hash list nodes separate storage, so adding a state to the GC list can't corrupt the hash linkage that RCU readers still follow.

19) xfrm: Serialize device state teardown
Let only one caller free the device state and hold a reference in the flush, so the state GC and a device flush can't free the same state.

20) xfrm: Wait for an RCU grace period before freeing device state Wait for an RCU grace period after collecting the device states, so the driver state isn't freed while readers are still using it.

21) Revert "xfrm: serialize state GC with device state flush" Revert the GC and flush mutex, since the reference handling and the single-free rule make it unnecessary and it can't cover the lookup path.

22) xfrm: Serialize offload stats updates with x->lock Serialize the offload stats refresh with the state lock, so the counters aren't updated twice and a dump doesn't copy them while they change.

Please pull or let me know if there are problems.

Thanks!

The following changes since commit 787268686c64be60023743b527645a907e38ccca:

ipmr, ip6mr: queue netlink route queries out of band (2026-11-03 22:30:55 +0100)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git tags/ipsec-2026-12-01

for you to fetch changes up to bb65a0da99bf4861dce01149ba64e875e47ae5a3:

xfrm: Serialize offload stats updates with x->lock (2026-11-30 11:36:34 +0100)

----------------------------------------------------------------
ipsec-2026-12-01

----------------------------------------------------------------
Andrii Tereshchenko (2):
xfrm: iptfs: make room before copying a continuation in reassembly xfrm/compat: pass on the translated length of a socket policy

Baek Kyu, Kim (1):
xfrm: espintcp: read the socket error queue for MSG_ERRQUEUE

Cen Zhang (3):
xfrm: keep the mode module pinned until destroy_state returns
xfrm: keep old state references until migration deletion completes
xfrm: hold migrated states through rollback

Cosmin Ratiu (1):
xfrm: replay: Fix late packet handling with ESN crypto offload

Guoshuai Yang (1):
xfrm: esp: reset outer TCP GSO metadata on espintcp input

Jamal Hadi Salim (1):
net: xfrm: interface: restore dst_orig on every xfrm interface

Jianbo Liu (5):
xfrm: Give GC list nodes their own storage
xfrm: Serialize device state teardown
xfrm: Wait for an RCU grace period before freeing device state Revert "xfrm: serialize state GC with device state flush"
xfrm: Serialize offload stats updates with x->lock

Jérémy Jean (2):
xfrm: fix IPv6 first-fragment protocol decode
xfrm: fix selector matching for IPv6 atomic fragments

Kyle Zeng (1):
xfrm: serialize SA activation with state deletion

Nguyen Ngoc Thang (1):
xfrm: iptfs: force a dst reference before queueing an skb

Sewook Seo (1):
xfrm: check inner family via skb_dst for small_ipv6 DF clearing

Yasuaki Torimaru (1):
xfrm: account XFRMA_MARK in xfrm_sa_len()

Zhiling Zou (1):
xfrm: ipcomp: account full fragment pages in truesize

Zihan Xi (1):
xfrm: espintcp: select receive path by skb protocol

 include/net/esp.h              |  51 +++++++++++++
 include/net/ipv6.h             |   1 +
 include/net/xfrm.h             |  26 ++++---
 net/core/filter.c              |   8 --
 net/ipv4/esp4.c                |   9 +++
 net/ipv6/esp6.c                |   9 +++
 net/ipv6/exthdrs_core.c        |  25 ++++---
 net/xfrm/espintcp.c            |   5 +-
 net/xfrm/xfrm_compat.c         |  18 ++++-
 net/xfrm/xfrm_device.c         |   4 +-
 net/xfrm/xfrm_interface_bpf.c  |  19 ++---
 net/xfrm/xfrm_interface_core.c |  22 +++---
 net/xfrm/xfrm_ipcomp.c         |   2 +-
 net/xfrm/xfrm_iptfs.c          |  17 ++++-
 net/xfrm/xfrm_output.c         |   5 +-
 net/xfrm/xfrm_policy.c         |  61 +++++++++++----
 net/xfrm/xfrm_replay.c         |  14 +++-
 net/xfrm/xfrm_state.c          | 164 ++++++++++++++++++++++++++++++++---------
 net/xfrm/xfrm_user.c           |  50 +++++++++++--
 19 files changed, 395 insertions(+), 115 deletions(-)