CVE-2025-21720: Vulnerability in Linux Linux
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---
AI Analysis
Technical Summary
CVE-2025-21720 is a vulnerability identified in the Linux kernel's XFRM (IPsec) subsystem, specifically related to the handling of security path (secpath) entries during packet offload operations. The vulnerability arises when IP forwarding is enabled on a system (i.e., /proc/sys/net/ipv4/ip_forward is set to 1). Normally, when packets are processed by hardware offload engines, the secpath is used to indicate that the packet's security processing has already been handled and should be removed after policy checks. However, due to this vulnerability, the secpath is not properly removed in the IP forwarding scenario. This causes packets that have already been processed to be reintroduced into the driver transmit (TX) path with the xfrm_offload flag set, leading to a NULL pointer dereference in the mlx5 network driver (commonly used for Mellanox ConnectX-5 and similar hardware). The kernel panic and crash occur because the driver attempts to access memory at address 0x0, which is invalid. The detailed kernel oops log shows the fault occurring in mlx5e_ipsec_handle_tx_skb and mlx5e_xmit functions, confirming the issue is triggered during packet transmission in the IPsec offload context. This vulnerability can cause denial of service (DoS) by crashing the kernel, disrupting network connectivity and potentially impacting system availability. It affects Linux kernel versions including the referenced commit hashes and is relevant for systems using IP forwarding with IPsec offload enabled on mlx5-based network interfaces. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.
Potential Impact
For European organizations, the impact of CVE-2025-21720 can be significant, especially for those relying on Linux-based infrastructure with IP forwarding enabled and using Mellanox mlx5 network adapters for IPsec offload. The vulnerability can cause kernel panics leading to system crashes and network outages, which may disrupt critical services such as VPN gateways, routers, firewalls, and other network appliances. Organizations in sectors like finance, telecommunications, government, and critical infrastructure that depend on stable and secure IPsec VPNs for secure communications are particularly at risk. The denial of service caused by this vulnerability could lead to operational downtime, loss of productivity, and potential exposure to further attacks if fallback security mechanisms are not in place. Additionally, recovery from kernel panics often requires manual intervention or automated failover mechanisms, which may not be present in all environments, increasing the risk of prolonged outages.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should: 1) Immediately apply the official Linux kernel patches that address the secpath removal issue in the XFRM subsystem once available from trusted Linux distributions or kernel maintainers. 2) Temporarily disable IP forwarding (/proc/sys/net/ipv4/ip_forward) on affected systems if IP forwarding is not essential, to prevent triggering the vulnerability. 3) If IP forwarding is required, consider disabling IPsec offload features on mlx5 network interfaces until patches are applied, as the vulnerability is tied to offload processing. 4) Monitor kernel logs and network device behavior for signs of crashes or anomalies related to mlx5 drivers. 5) Implement high availability and redundancy for critical network devices to minimize impact from potential crashes. 6) Conduct thorough testing of kernel updates in staging environments before deployment to production to ensure stability. 7) Maintain up-to-date backups and recovery procedures to quickly restore affected systems. 8) Engage with hardware vendors (e.g., Mellanox/NVIDIA) for any firmware updates or advisories related to mlx5 devices that may complement kernel fixes.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain
CVE-2025-21720: Vulnerability in Linux Linux
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---
AI-Powered Analysis
Technical Analysis
CVE-2025-21720 is a vulnerability identified in the Linux kernel's XFRM (IPsec) subsystem, specifically related to the handling of security path (secpath) entries during packet offload operations. The vulnerability arises when IP forwarding is enabled on a system (i.e., /proc/sys/net/ipv4/ip_forward is set to 1). Normally, when packets are processed by hardware offload engines, the secpath is used to indicate that the packet's security processing has already been handled and should be removed after policy checks. However, due to this vulnerability, the secpath is not properly removed in the IP forwarding scenario. This causes packets that have already been processed to be reintroduced into the driver transmit (TX) path with the xfrm_offload flag set, leading to a NULL pointer dereference in the mlx5 network driver (commonly used for Mellanox ConnectX-5 and similar hardware). The kernel panic and crash occur because the driver attempts to access memory at address 0x0, which is invalid. The detailed kernel oops log shows the fault occurring in mlx5e_ipsec_handle_tx_skb and mlx5e_xmit functions, confirming the issue is triggered during packet transmission in the IPsec offload context. This vulnerability can cause denial of service (DoS) by crashing the kernel, disrupting network connectivity and potentially impacting system availability. It affects Linux kernel versions including the referenced commit hashes and is relevant for systems using IP forwarding with IPsec offload enabled on mlx5-based network interfaces. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.
Potential Impact
For European organizations, the impact of CVE-2025-21720 can be significant, especially for those relying on Linux-based infrastructure with IP forwarding enabled and using Mellanox mlx5 network adapters for IPsec offload. The vulnerability can cause kernel panics leading to system crashes and network outages, which may disrupt critical services such as VPN gateways, routers, firewalls, and other network appliances. Organizations in sectors like finance, telecommunications, government, and critical infrastructure that depend on stable and secure IPsec VPNs for secure communications are particularly at risk. The denial of service caused by this vulnerability could lead to operational downtime, loss of productivity, and potential exposure to further attacks if fallback security mechanisms are not in place. Additionally, recovery from kernel panics often requires manual intervention or automated failover mechanisms, which may not be present in all environments, increasing the risk of prolonged outages.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should: 1) Immediately apply the official Linux kernel patches that address the secpath removal issue in the XFRM subsystem once available from trusted Linux distributions or kernel maintainers. 2) Temporarily disable IP forwarding (/proc/sys/net/ipv4/ip_forward) on affected systems if IP forwarding is not essential, to prevent triggering the vulnerability. 3) If IP forwarding is required, consider disabling IPsec offload features on mlx5 network interfaces until patches are applied, as the vulnerability is tied to offload processing. 4) Monitor kernel logs and network device behavior for signs of crashes or anomalies related to mlx5 drivers. 5) Implement high availability and redundancy for critical network devices to minimize impact from potential crashes. 6) Conduct thorough testing of kernel updates in staging environments before deployment to production to ensure stability. 7) Maintain up-to-date backups and recovery procedures to quickly restore affected systems. 8) Engage with hardware vendors (e.g., Mellanox/NVIDIA) for any firmware updates or advisories related to mlx5 devices that may complement kernel fixes.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-12-29T08:45:45.753Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9832c4522896dcbe85c4
Added to database: 5/21/2025, 9:09:06 AM
Last enriched: 6/30/2025, 8:27:27 AM
Last updated: 8/15/2025, 9:45:43 PM
Views: 16
Related Threats
CVE-2025-9169: Cross Site Scripting in SolidInvoice
MediumCVE-2025-9168: Cross Site Scripting in SolidInvoice
MediumCVE-2025-8364: Address bar spoofing using an blob URI on Firefox for Android in Mozilla Firefox
HighCVE-2025-8042: Sandboxed iframe could start downloads in Mozilla Firefox
HighCVE-2025-8041: Incorrect URL truncation in Firefox for Android in Mozilla Firefox
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.