# CVE-2025-38590: net/mlx5e: Remove skb secpath if xfrm state is not found

> 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.67% (percentile 47, 2026-11-28)
- **CWE:** CWE-401
- **Published:** 2025-08-19T17:03:11.691Z
- **Modified:** 2026-10-30T13:18:06.203Z

## Who should check

- Anyone running Linux \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 8c684ce222c54cd67ca0358ca718c8b042c75541; \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 314f568b84b01f6eac1e4313ca47f9ade4349443; \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 781a0bbf377443ef06f3248221f06cb555935530; \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 3a5782431d84716b66302b07ff1b32fea1023bd5; \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 137b12a4900eb6971b889839eab6036f72cbb217; \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 6d19c44b5c6dd72f9a357d0399604ec16a77de3c
- Anyone running Linux 5.9

## Description

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

net/mlx5e: Remove skb secpath if xfrm state is not found

Hardware returns a unique identifier for a decrypted packet's xfrm
state, this state is looked up in an xarray. However, the state might
have been freed by the time of this lookup.

Currently, if the state is not found, only a counter is incremented.
The secpath (sp) extension on the skb is not removed, resulting in
sp-\>len becoming 0.

Subsequently, functions like \_\_xfrm\_policy\_check() attempt to access
fields such as xfrm\_input\_state(skb)-\>xso.type (which dereferences
sp-\>xvec\[sp-\>len - 1\]) without first validating sp-\>len. This leads to
a crash when dereferencing an invalid state pointer.

This patch prevents the crash by explicitly removing the secpath
extension from the skb if the xfrm state is not found after hardware
decryption. This ensures downstream functions do not operate on a
zero-length secpath.

 BUG: unable to handle page fault for address: ffffffff000002c8
 \#PF: supervisor read access in kernel mode
 \#PF: error\_code(0x0000) - not-present page
 PGD 282e067 P4D 282e067 PUD 0
 Oops: Oops: 0000 \[\#1\] SMP
 CPU: 12 UID: 0 PID: 0 Comm: swapper/12 Not tainted 6.15.0-rc7\_for\_upstream\_min\_debug\_2025\_05\_27\_22\_44 \#1 NONE
 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
 RIP: 0010:\_\_xfrm\_policy\_check+0x61a/0xa30
 Code: b6 77 7f 83 e6 02 74 14 4d 8b af d8 00 00 00 41 0f b6 45 05 c1 e0 03 48 98 49 01 c5 41 8b 45 00 83 e8 01 48 98 49 8b 44 c5 10 \<0f\> b6 80 c8 02 00 00 83 e0 0c 3c 04 0f 84 0c 02 00 00 31 ff 80 fa
 RSP: 0018:ffff88885fb04918 EFLAGS: 00010297
 RAX: ffffffff00000000 RBX: 0000000000000002 RCX: 0000000000000000
 RDX: 0000000000000002 RSI: 0000000000000002 RDI: 0000000000000000
 RBP: ffffffff8311af80 R08: 0000000000000020 R09: 00000000c2eda353
 R10: ffff88812be2bbc8 R11: 000000001faab533 R12: ffff88885fb049c8
 R13: ffff88812be2bbc8 R14: 0000000000000000 R15: ffff88811896ae00
 FS:  0000000000000000(0000) GS:ffff8888dca82000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: ffffffff000002c8 CR3: 0000000243050002 CR4: 0000000000372eb0
 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
 Call Trace:
  \<IRQ\>
  ? try\_to\_wake\_up+0x108/0x4c0
  ? udp4\_lib\_lookup2+0xbe/0x150
  ? udp\_lib\_lport\_inuse+0x100/0x100
  ? \_\_udp4\_lib\_lookup+0x2b0/0x410
  \_\_xfrm\_policy\_check2.constprop.0+0x11e/0x130
  udp\_queue\_rcv\_one\_skb+0x1d/0x530
  udp\_unicast\_rcv\_skb+0x76/0x90
  \_\_udp4\_lib\_rcv+0xa64/0xe90
  ip\_protocol\_deliver\_rcu+0x20/0x130
  ip\_local\_deliver\_finish+0x75/0xa0
  ip\_local\_deliver+0xc1/0xd0
  ? ip\_protocol\_deliver\_rcu+0x130/0x130
  ip\_sublist\_rcv+0x1f9/0x240
  ? ip\_rcv\_finish\_core+0x430/0x430
  ip\_list\_rcv+0xfc/0x130
  \_\_netif\_receive\_skb\_list\_core+0x181/0x1e0
  netif\_receive\_skb\_list\_internal+0x200/0x360
  ? mlx5e\_build\_rx\_skb+0x1bc/0xda0 \[mlx5\_core\]
  gro\_receive\_skb+0xfd/0x210
  mlx5e\_handle\_rx\_cqe\_mpwrq+0x141/0x280 \[mlx5\_core\]
  mlx5e\_poll\_rx\_cq+0xcc/0x8e0 \[mlx5\_core\]
  ? mlx5e\_handle\_rx\_dim+0x91/0xd0 \[mlx5\_core\]
  mlx5e\_napi\_poll+0x114/0xab0 \[mlx5\_core\]
  \_\_napi\_poll+0x25/0x170
  net\_rx\_action+0x32d/0x3a0
  ? mlx5\_eq\_comp\_int+0x8d/0x280 \[mlx5\_core\]
  ? notifier\_call\_chain+0x33/0xa0
  handle\_softirqs+0xda/0x250
  irq\_exit\_rcu+0x6d/0xc0
  common\_interrupt+0x81/0xa0
  \</IRQ\>

## Affected and fixed versions

- Linux: \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 8c684ce222c54cd67ca0358ca718c8b042c75541; \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 314f568b84b01f6eac1e4313ca47f9ade4349443; \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 781a0bbf377443ef06f3248221f06cb555935530; \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 3a5782431d84716b66302b07ff1b32fea1023bd5; \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 137b12a4900eb6971b889839eab6036f72cbb217; \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 6d19c44b5c6dd72f9a357d0399604ec16a77de3c (cvelist)
- Linux: 5.9 (cvelist)

## Mitigation

- Upgrade Linux to 6d19c44b5c6dd72f9a357d0399604ec16a77de3c 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-38590. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-38590.md
Affected: Linux >= b2ac7541e3777f325c49d900550c9e3dd10c0eda, < 8c684ce222c54cd67ca0358ca718c8b042c75541; >= b2ac7541e3777f325c49d900550c9e3dd10c0eda, < 314f568b84b01f6eac1e4313ca47f9ade4349443; >= b2ac7541e3777f325c49d900550c9e3dd10c0eda, < 781a0bbf377443ef06f3248221f06cb555935530; >= b2ac7541e3777f325c49d90…
Fixed in: Linux 8c684ce222c54cd67ca0358ca718c8b042c75541, Linux 314f568b84b01f6eac1e4313ca47f9ade4349443, Linux 781a0bbf377443ef06f3248221f06cb555935530, Linux 3a5782431d84716b66302b07ff1b32fea1023bd5, Linux 137b12a4900eb6971b889839eab6036f72cbb217, Linux 6d19c44b5c6dd72f9a357d0399604ec16a77de3c

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-38590 being exploited?

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

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

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

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

Linux \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 8c684ce222c54cd67ca0358ca718c8b042c75541; \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 314f568b84b01f6eac1e4313ca47f9ade4349443; \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 781a0bbf377443ef06f3248221f06cb555935530; \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 3a5782431d84716b66302b07ff1b32fea1023bd5; \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 137b12a4900eb6971b889839eab6036f72cbb217; \>= b2ac7541e3777f325c49d900550c9e3dd10c0eda, \< 6d19c44b5c6dd72f9a357d0399604ec16a77de3c; Linux 5.9.

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

Yes. Fixed in Linux 8c684ce222c54cd67ca0358ca718c8b042c75541, Linux 314f568b84b01f6eac1e4313ca47f9ade4349443, Linux 781a0bbf377443ef06f3248221f06cb555935530, Linux 3a5782431d84716b66302b07ff1b32fea1023bd5, Linux 137b12a4900eb6971b889839eab6036f72cbb217, Linux 6d19c44b5c6dd72f9a357d0399604ec16a77de3c. Upgrade Linux to 6d19c44b5c6dd72f9a357d0399604ec16a77de3c or later.

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

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/314f568b84b01f6eac1e4313ca47f9ade4349443>
- patch: <https://git.kernel.org/stable/c/781a0bbf377443ef06f3248221f06cb555935530>
- patch: <https://git.kernel.org/stable/c/3a5782431d84716b66302b07ff1b32fea1023bd5>
- patch: <https://git.kernel.org/stable/c/137b12a4900eb6971b889839eab6036f72cbb217>
- patch: <https://git.kernel.org/stable/c/6d19c44b5c6dd72f9a357d0399604ec16a77de3c>
- other: <https://git.kernel.org/stable/c/8c684ce222c54cd67ca0358ca718c8b042c75541>

## 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-38590>

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