# CVE-2025-38019: mlxsw: spectrum\_router: Fix use-after-free when deleting GRE net devices

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.29% (percentile 14, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-06-18T09:28:27.046Z
- **Modified:** 2026-06-17T09:15:53.603Z

## Who should check

- Anyone running Linux \>= 8fdb09a7674c61c4f0e5faf0d63b3ce500a341b0, \< f1ecccb5cdda39bca8cd17bb0b6cf61361e33578; \>= 8fdb09a7674c61c4f0e5faf0d63b3ce500a341b0, \< abc43c1ffdbc801b0b04ac845bfaf1d42b8f68f7; \>= 8fdb09a7674c61c4f0e5faf0d63b3ce500a341b0, \< 9ab7945f3a61ed23da412e30f1e56414c05c4f06; \>= 8fdb09a7674c61c4f0e5faf0d63b3ce500a341b0, \< 92ec4855034b2c4d13f117558dc73d20581fa9ff
- Anyone running Linux 6.6

## Description

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

mlxsw: spectrum\_router: Fix use-after-free when deleting GRE net devices

The driver only offloads neighbors that are constructed on top of net
devices registered by it or their uppers (which are all Ethernet). The
device supports GRE encapsulation and decapsulation of forwarded
traffic, but the driver will not offload dummy neighbors constructed on
top of GRE net devices as they are not uppers of its net devices:

 \# ip link add name gre1 up type gre tos inherit local 192.0.2.1 remote 198.51.100.1
 \# ip neigh add 0.0.0.0 lladdr 0.0.0.0 nud noarp dev gre1
 $ ip neigh show dev gre1 nud noarp
 0.0.0.0 lladdr 0.0.0.0 NOARP

(Note that the neighbor is not marked with 'offload')

When the driver is reloaded and the existing configuration is replayed,
the driver does not perform the same check regarding existing neighbors
and offloads the previously added one:

 \# devlink dev reload pci/0000:01:00.0
 $ ip neigh show dev gre1 nud noarp
 0.0.0.0 lladdr 0.0.0.0 offload NOARP

If the neighbor is later deleted, the driver will ignore the
notification (given the GRE net device is not its upper) and will
therefore keep referencing freed memory, resulting in a use-after-free
\[1\] when the net device is deleted:

 \# ip neigh del 0.0.0.0 lladdr 0.0.0.0 dev gre1
 \# ip link del dev gre1

Fix by skipping neighbor replay if the net device for which the replay
is performed is not our upper.

\[1\]
BUG: KASAN: slab-use-after-free in mlxsw\_sp\_neigh\_entry\_update+0x1ea/0x200
Read of size 8 at addr ffff888155b0e420 by task ip/2282
\[...\]
Call Trace:
 \<TASK\>
 dump\_stack\_lvl+0x6f/0xa0
 print\_address\_description.constprop.0+0x6f/0x350
 print\_report+0x108/0x205
 kasan\_report+0xdf/0x110
 mlxsw\_sp\_neigh\_entry\_update+0x1ea/0x200
 mlxsw\_sp\_router\_rif\_gone\_sync+0x2a8/0x440
 mlxsw\_sp\_rif\_destroy+0x1e9/0x750
 mlxsw\_sp\_netdevice\_ipip\_ol\_event+0x3c9/0xdc0
 mlxsw\_sp\_router\_netdevice\_event+0x3ac/0x15e0
 notifier\_call\_chain+0xca/0x150
 call\_netdevice\_notifiers\_info+0x7f/0x100
 unregister\_netdevice\_many\_notify+0xc8c/0x1d90
 rtnl\_dellink+0x34e/0xa50
 rtnetlink\_rcv\_msg+0x6fb/0xb70
 netlink\_rcv\_skb+0x131/0x360
 netlink\_unicast+0x426/0x710
 netlink\_sendmsg+0x75a/0xc20
 \_\_sock\_sendmsg+0xc1/0x150
 \_\_\_\_sys\_sendmsg+0x5aa/0x7b0
 \_\_\_sys\_sendmsg+0xfc/0x180
 \_\_sys\_sendmsg+0x121/0x1b0
 do\_syscall\_64+0xbb/0x1d0
 entry\_SYSCALL\_64\_after\_hwframe+0x4b/0x53

## Affected and fixed versions

- Linux: \>= 8fdb09a7674c61c4f0e5faf0d63b3ce500a341b0, \< f1ecccb5cdda39bca8cd17bb0b6cf61361e33578; \>= 8fdb09a7674c61c4f0e5faf0d63b3ce500a341b0, \< abc43c1ffdbc801b0b04ac845bfaf1d42b8f68f7; \>= 8fdb09a7674c61c4f0e5faf0d63b3ce500a341b0, \< 9ab7945f3a61ed23da412e30f1e56414c05c4f06; \>= 8fdb09a7674c61c4f0e5faf0d63b3ce500a341b0, \< 92ec4855034b2c4d13f117558dc73d20581fa9ff (cvelist)
- Linux: 6.6 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2025-38019.md
Affected: Linux >= 8fdb09a7674c61c4f0e5faf0d63b3ce500a341b0, < f1ecccb5cdda39bca8cd17bb0b6cf61361e33578; >= 8fdb09a7674c61c4f0e5faf0d63b3ce500a341b0, < abc43c1ffdbc801b0b04ac845bfaf1d42b8f68f7; >= 8fdb09a7674c61c4f0e5faf0d63b3ce500a341b0, < 9ab7945f3a61ed23da412e30f1e56414c05c4f06; >= 8fdb09a7674c61c4f0e5faf…
Fixed in: Linux 9ab7945f3a61ed23da412e30f1e56414c05c4f06, Linux 92ec4855034b2c4d13f117558dc73d20581fa9ff

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

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

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

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 8fdb09a7674c61c4f0e5faf0d63b3ce500a341b0, \< f1ecccb5cdda39bca8cd17bb0b6cf61361e33578; \>= 8fdb09a7674c61c4f0e5faf0d63b3ce500a341b0, \< abc43c1ffdbc801b0b04ac845bfaf1d42b8f68f7; \>= 8fdb09a7674c61c4f0e5faf0d63b3ce500a341b0, \< 9ab7945f3a61ed23da412e30f1e56414c05c4f06; \>= 8fdb09a7674c61c4f0e5faf0d63b3ce500a341b0, \< 92ec4855034b2c4d13f117558dc73d20581fa9ff; Linux 6.6.

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

Yes. Fixed in Linux 9ab7945f3a61ed23da412e30f1e56414c05c4f06, Linux 92ec4855034b2c4d13f117558dc73d20581fa9ff. Upgrade Linux to 92ec4855034b2c4d13f117558dc73d20581fa9ff or later.

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

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/f1ecccb5cdda39bca8cd17bb0b6cf61361e33578>
- patch: <https://git.kernel.org/stable/c/abc43c1ffdbc801b0b04ac845bfaf1d42b8f68f7>
- patch: <https://git.kernel.org/stable/c/9ab7945f3a61ed23da412e30f1e56414c05c4f06>
- patch: <https://git.kernel.org/stable/c/92ec4855034b2c4d13f117558dc73d20581fa9ff>

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

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