# CVE-2025-21970: net/mlx5: Bridge, fix the crash caused by LAG state check

> 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, CNA) `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.31% (percentile 16, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-04-01T15:47:03.912Z
- **Modified:** 2026-10-15T22:18:12.493Z

## Who should check

- Anyone running Linux \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< f90c4d6572488e2bad38cca00f1c59174a538a1a; \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< 86ff45f5f61ae1d0d17f0f6d8797b052eacfd8f1; \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< bd7e3a42800743a7748c83243e4cafc1b995d4c4; \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< f7bf259a04271165ae667ad21cfc60c6413f25ca; \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< 5dd8bf6ab1d6db40f5d09603759fa88caec19e7f; \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< 4b8eeed4fb105770ce6dc84a2c6ef953c7b71cbb
- Anyone running Linux 5.15

## Description

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

net/mlx5: Bridge, fix the crash caused by LAG state check

When removing LAG device from bridge, NETDEV\_CHANGEUPPER event is
triggered. Driver finds the lower devices (PFs) to flush all the
offloaded entries. And mlx5\_lag\_is\_shared\_fdb is checked, it returns
false if one of PF is unloaded. In such case,
mlx5\_esw\_bridge\_lag\_rep\_get() and its caller return NULL, instead of
the alive PF, and the flush is skipped.

Besides, the bridge fdb entry's lastuse is updated in mlx5 bridge
event handler. But this SWITCHDEV\_FDB\_ADD\_TO\_BRIDGE event can be
ignored in this case because the upper interface for bond is deleted,
and the entry will never be aged because lastuse is never updated.

To make things worse, as the entry is alive, mlx5 bridge workqueue
keeps sending that event, which is then handled by kernel bridge
notifier. It causes the following crash when accessing the passed bond
netdev which is already destroyed.

To fix this issue, remove such checks. LAG state is already checked in
commit 15f8f168952f ("net/mlx5: Bridge, verify LAG state when adding
bond to bridge"), driver still need to skip offload if LAG becomes
invalid state after initialization.

 Oops: stack segment: 0000 \[\#1\] SMP
 CPU: 3 UID: 0 PID: 23695 Comm: kworker/u40:3 Tainted: G           OE      6.11.0\_mlnx \#1
 Tainted: \[O\]=OOT\_MODULE, \[E\]=UNSIGNED\_MODULE
 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
 Workqueue: mlx5\_bridge\_wq mlx5\_esw\_bridge\_update\_work \[mlx5\_core\]
 RIP: 0010:br\_switchdev\_event+0x2c/0x110 \[bridge\]
 Code: 44 00 00 48 8b 02 48 f7 00 00 02 00 00 74 69 41 54 55 53 48 83 ec 08 48 8b a8 08 01 00 00 48 85 ed 74 4a 48 83 fe 02 48 89 d3 \<4c\> 8b 65 00 74 23 76 49 48 83 fe 05 74 7e 48 83 fe 06 75 2f 0f b7
 RSP: 0018:ffffc900092cfda0 EFLAGS: 00010297
 RAX: ffff888123bfe000 RBX: ffffc900092cfe08 RCX: 00000000ffffffff
 RDX: ffffc900092cfe08 RSI: 0000000000000001 RDI: ffffffffa0c585f0
 RBP: 6669746f6e690a30 R08: 0000000000000000 R09: ffff888123ae92c8
 R10: 0000000000000000 R11: fefefefefefefeff R12: ffff888123ae9c60
 R13: 0000000000000001 R14: ffffc900092cfe08 R15: 0000000000000000
 FS:  0000000000000000(0000) GS:ffff88852c980000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 00007f15914c8734 CR3: 0000000002830005 CR4: 0000000000770ef0
 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
 PKRU: 55555554
 Call Trace:
  \<TASK\>
  ? \_\_die\_body+0x1a/0x60
  ? die+0x38/0x60
  ? do\_trap+0x10b/0x120
  ? do\_error\_trap+0x64/0xa0
  ? exc\_stack\_segment+0x33/0x50
  ? asm\_exc\_stack\_segment+0x22/0x30
  ? br\_switchdev\_event+0x2c/0x110 \[bridge\]
  ? sched\_balance\_newidle.isra.149+0x248/0x390
  notifier\_call\_chain+0x4b/0xa0
  atomic\_notifier\_call\_chain+0x16/0x20
  mlx5\_esw\_bridge\_update+0xec/0x170 \[mlx5\_core\]
  mlx5\_esw\_bridge\_update\_work+0x19/0x40 \[mlx5\_core\]
  process\_scheduled\_works+0x81/0x390
  worker\_thread+0x106/0x250
  ? bh\_worker+0x110/0x110
  kthread+0xb7/0xe0
  ? kthread\_park+0x80/0x80
  ret\_from\_fork+0x2d/0x50
  ? kthread\_park+0x80/0x80
  ret\_from\_fork\_asm+0x11/0x20
  \</TASK\>

## Affected and fixed versions

- Linux: \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< f90c4d6572488e2bad38cca00f1c59174a538a1a; \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< 86ff45f5f61ae1d0d17f0f6d8797b052eacfd8f1; \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< bd7e3a42800743a7748c83243e4cafc1b995d4c4; \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< f7bf259a04271165ae667ad21cfc60c6413f25ca; \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< 5dd8bf6ab1d6db40f5d09603759fa88caec19e7f; \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< 4b8eeed4fb105770ce6dc84a2c6ef953c7b71cbb (cvelist)
- Linux: 5.15 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2025-21970.md
Affected: Linux >= ff9b7521468bc2909293c1cda66a245a49688f6f, < f90c4d6572488e2bad38cca00f1c59174a538a1a; >= ff9b7521468bc2909293c1cda66a245a49688f6f, < 86ff45f5f61ae1d0d17f0f6d8797b052eacfd8f1; >= ff9b7521468bc2909293c1cda66a245a49688f6f, < bd7e3a42800743a7748c83243e4cafc1b995d4c4; >= ff9b7521468bc2909293c1c…
Fixed in: Linux 86ff45f5f61ae1d0d17f0f6d8797b052eacfd8f1, Linux 5dd8bf6ab1d6db40f5d09603759fa88caec19e7f, Linux 4b8eeed4fb105770ce6dc84a2c6ef953c7b71cbb

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

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

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

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

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

Linux \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< f90c4d6572488e2bad38cca00f1c59174a538a1a; \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< 86ff45f5f61ae1d0d17f0f6d8797b052eacfd8f1; \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< bd7e3a42800743a7748c83243e4cafc1b995d4c4; \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< f7bf259a04271165ae667ad21cfc60c6413f25ca; \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< 5dd8bf6ab1d6db40f5d09603759fa88caec19e7f; \>= ff9b7521468bc2909293c1cda66a245a49688f6f, \< 4b8eeed4fb105770ce6dc84a2c6ef953c7b71cbb; Linux 5.15.

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

Yes. Fixed in Linux 86ff45f5f61ae1d0d17f0f6d8797b052eacfd8f1, Linux 5dd8bf6ab1d6db40f5d09603759fa88caec19e7f, Linux 4b8eeed4fb105770ce6dc84a2c6ef953c7b71cbb. Upgrade Linux to 4b8eeed4fb105770ce6dc84a2c6ef953c7b71cbb or later.

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

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/f90c4d6572488e2bad38cca00f1c59174a538a1a>
- patch: <https://git.kernel.org/stable/c/86ff45f5f61ae1d0d17f0f6d8797b052eacfd8f1>
- patch: <https://git.kernel.org/stable/c/bd7e3a42800743a7748c83243e4cafc1b995d4c4>
- patch: <https://git.kernel.org/stable/c/f7bf259a04271165ae667ad21cfc60c6413f25ca>
- patch: <https://git.kernel.org/stable/c/5dd8bf6ab1d6db40f5d09603759fa88caec19e7f>
- patch: <https://git.kernel.org/stable/c/4b8eeed4fb105770ce6dc84a2c6ef953c7b71cbb>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>

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

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