# CVE-2025-21720: xfrm: delete intermediate secpath entry in packet offload mode

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.69% (percentile 48, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-02-27T02:07:29.179Z
- **Modified:** 2026-08-05T11:53:55.920Z

## Who should check

- Anyone running Linux \>= 5958372ddf628fe6f4c3e49425734ad32fcfb13c, \< c6e1b2cac24b2a4d1dd472071021bf00c26450eb; \>= 5958372ddf628fe6f4c3e49425734ad32fcfb13c, \< 6945701ca1572f81bc9bb46f624b02eabb3eaf3e; \>= 5958372ddf628fe6f4c3e49425734ad32fcfb13c, \< 981ad4c882096e7375b8c2181dd4c3ee58ea5bae; \>= 5958372ddf628fe6f4c3e49425734ad32fcfb13c, \< 600258d555f0710b9c47fb78d2d80a4aecd608cc
- Anyone running Linux 6.2

## Description

In the Linux kernel, the following vulnerability has been resolved:

xfrm: delete intermediate secpath entry in packet offload mode

Packets handled by hardware have added secpath as a way to inform XFRM
core code that this path was already handled. That secpath is not needed
at all after policy is checked and it is removed later in the stack.

However, in the case of IP forwarding is enabled (/proc/sys/net/ipv4/ip\_forward),
that secpath is not removed and packets which already were handled are reentered
to the driver TX path with xfrm\_offload set.

The following kernel panic is observed in mlx5 in such case:

 mlx5\_core 0000:04:00.0 enp4s0f0np0: Link up
 mlx5\_core 0000:04:00.1 enp4s0f1np1: Link up
 Initializing XFRM netlink socket
 IPsec XFRM device driver
 BUG: kernel NULL pointer dereference, address: 0000000000000000
 \#PF: supervisor instruction fetch in kernel mode
 \#PF: error\_code(0x0010) - not-present page
 PGD 0 P4D 0
 Oops: Oops: 0010 \[\#1\] PREEMPT SMP
 CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.13.0-rc1-alex \#3
 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-1ubuntu1.1 04/01/2014
 RIP: 0010:0x0
 Code: Unable to access opcode bytes at 0xffffffffffffffd6.
 RSP: 0018:ffffb87380003800 EFLAGS: 00010206
 RAX: ffff8df004e02600 RBX: ffffb873800038d8 RCX: 00000000ffff98cf
 RDX: ffff8df00733e108 RSI: ffff8df00521fb80 RDI: ffff8df001661f00
 RBP: ffffb87380003850 R08: ffff8df013980000 R09: 0000000000000010
 R10: 0000000000000002 R11: 0000000000000002 R12: ffff8df001661f00
 R13: ffff8df00521fb80 R14: ffff8df00733e108 R15: ffff8df011faf04e
 FS:  0000000000000000(0000) GS:ffff8df46b800000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: ffffffffffffffd6 CR3: 0000000106384000 CR4: 0000000000350ef0
 Call Trace:
  \<IRQ\>
  ? show\_regs+0x63/0x70
  ? \_\_die\_body+0x20/0x60
  ? \_\_die+0x2b/0x40
  ? page\_fault\_oops+0x15c/0x550
  ? do\_user\_addr\_fault+0x3ed/0x870
  ? exc\_page\_fault+0x7f/0x190
  ? asm\_exc\_page\_fault+0x27/0x30
  mlx5e\_ipsec\_handle\_tx\_skb+0xe7/0x2f0 \[mlx5\_core\]
  mlx5e\_xmit+0x58e/0x1980 \[mlx5\_core\]
  ? \_\_fib\_lookup+0x6a/0xb0
  dev\_hard\_start\_xmit+0x82/0x1d0
  sch\_direct\_xmit+0xfe/0x390
  \_\_dev\_queue\_xmit+0x6d8/0xee0
  ? \_\_fib\_lookup+0x6a/0xb0
  ? internal\_add\_timer+0x48/0x70
  ? mod\_timer+0xe2/0x2b0
  neigh\_resolve\_output+0x115/0x1b0
  \_\_neigh\_update+0x26a/0xc50
  neigh\_update+0x14/0x20
  arp\_process+0x2cb/0x8e0
  ? \_\_napi\_build\_skb+0x5e/0x70
  arp\_rcv+0x11e/0x1c0
  ? dev\_gro\_receive+0x574/0x820
  \_\_netif\_receive\_skb\_list\_core+0x1cf/0x1f0
  netif\_receive\_skb\_list\_internal+0x183/0x2a0
  napi\_complete\_done+0x76/0x1c0
  mlx5e\_napi\_poll+0x234/0x7a0 \[mlx5\_core\]
  \_\_napi\_poll+0x2d/0x1f0
  net\_rx\_action+0x1a6/0x370
  ? atomic\_notifier\_call\_chain+0x3b/0x50
  ? irq\_int\_handler+0x15/0x20 \[mlx5\_core\]
  handle\_softirqs+0xb9/0x2f0
  ? handle\_irq\_event+0x44/0x60
  irq\_exit\_rcu+0xdb/0x100
  common\_interrupt+0x98/0xc0
  \</IRQ\>
  \<TASK\>
  asm\_common\_interrupt+0x27/0x40
 RIP: 0010:pv\_native\_safe\_halt+0xb/0x10
 Code: 09 c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 22
 0f 1f 84 00 00 00 00 00 90 eb 07 0f 00 2d 7f e9 36 00 fb
40 00 83 ff 07 77 21 89 ff ff 24 fd 88 3d a1 bd 0f 21 f8
 RSP: 0018:ffffffffbe603de8 EFLAGS: 00000202
 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000f92f46680
 RDX: 0000000000000037 RSI: 00000000ffffffff RDI: 00000000000518d4
 RBP: ffffffffbe603df0 R08: 000000cd42e4dffb R09: ffffffffbe603d70
 R10: 0000004d80d62680 R11: 0000000000000001 R12: ffffffffbe60bf40
 R13: 0000000000000000 R14: 0000000000000000 R15: ffffffffbe60aff8
  ? default\_idle+0x9/0x20
  arch\_cpu\_idle+0x9/0x10
  default\_idle\_call+0x29/0xf0
  do\_idle+0x1f2/0x240
  cpu\_startup\_entry+0x2c/0x30
  rest\_init+0xe7/0x100
  start\_kernel+0x76b/0xb90
  x86\_64\_start\_reservations+0x18/0x30
  x86\_64\_start\_kernel+0xc0/0x110
  ? setup\_ghcb+0xe/0x130
  common\_startup\_64+0x13e/0x141
  \</TASK\>
 Modules linked in: esp4\_offload esp4 xfrm\_interface
xfrm6\_tunnel tunnel4 tunnel6 xfrm\_user xfrm\_algo binf
---truncated---

## Affected and fixed versions

- Linux: \>= 5958372ddf628fe6f4c3e49425734ad32fcfb13c, \< c6e1b2cac24b2a4d1dd472071021bf00c26450eb; \>= 5958372ddf628fe6f4c3e49425734ad32fcfb13c, \< 6945701ca1572f81bc9bb46f624b02eabb3eaf3e; \>= 5958372ddf628fe6f4c3e49425734ad32fcfb13c, \< 981ad4c882096e7375b8c2181dd4c3ee58ea5bae; \>= 5958372ddf628fe6f4c3e49425734ad32fcfb13c, \< 600258d555f0710b9c47fb78d2d80a4aecd608cc (cvelist)
- Linux: 6.2 (cvelist)

## Mitigation

- Upgrade Linux to 600258d555f0710b9c47fb78d2d80a4aecd608cc or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-21720. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-21720.md
Affected: Linux >= 5958372ddf628fe6f4c3e49425734ad32fcfb13c, < c6e1b2cac24b2a4d1dd472071021bf00c26450eb; >= 5958372ddf628fe6f4c3e49425734ad32fcfb13c, < 6945701ca1572f81bc9bb46f624b02eabb3eaf3e; >= 5958372ddf628fe6f4c3e49425734ad32fcfb13c, < 981ad4c882096e7375b8c2181dd4c3ee58ea5bae; >= 5958372ddf628fe6f4c3e49…
Fixed in: Linux 6945701ca1572f81bc9bb46f624b02eabb3eaf3e, Linux 981ad4c882096e7375b8c2181dd4c3ee58ea5bae, Linux 600258d555f0710b9c47fb78d2d80a4aecd608cc

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-21720 being exploited?

There is no confirmed exploitation: CVE-2025-21720 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.69% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-21720?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2025-21720?

Linux \>= 5958372ddf628fe6f4c3e49425734ad32fcfb13c, \< c6e1b2cac24b2a4d1dd472071021bf00c26450eb; \>= 5958372ddf628fe6f4c3e49425734ad32fcfb13c, \< 6945701ca1572f81bc9bb46f624b02eabb3eaf3e; \>= 5958372ddf628fe6f4c3e49425734ad32fcfb13c, \< 981ad4c882096e7375b8c2181dd4c3ee58ea5bae; \>= 5958372ddf628fe6f4c3e49425734ad32fcfb13c, \< 600258d555f0710b9c47fb78d2d80a4aecd608cc; Linux 6.2.

### Is there a fix for CVE-2025-21720?

Yes. Fixed in Linux 6945701ca1572f81bc9bb46f624b02eabb3eaf3e, Linux 981ad4c882096e7375b8c2181dd4c3ee58ea5bae, Linux 600258d555f0710b9c47fb78d2d80a4aecd608cc. Upgrade Linux to 600258d555f0710b9c47fb78d2d80a4aecd608cc or later.

### How do I check if I'm affected by CVE-2025-21720?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/c6e1b2cac24b2a4d1dd472071021bf00c26450eb>
- patch: <https://git.kernel.org/stable/c/6945701ca1572f81bc9bb46f624b02eabb3eaf3e>
- patch: <https://git.kernel.org/stable/c/981ad4c882096e7375b8c2181dd4c3ee58ea5bae>
- patch: <https://git.kernel.org/stable/c/600258d555f0710b9c47fb78d2d80a4aecd608cc>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-21720>

HTML: <https://flawdb.com/CVE-2025-21720> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-21720>
