# CVE-2024-53121: net/mlx5: fs, lock FTE when checking if active

> 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.26% (percentile 10, 2026-11-26)
- **CWE:** CWE-362
- **Published:** 2024-12-02T13:44:51.864Z
- **Modified:** 2026-08-05T11:43:51.943Z

## Who should check

- Anyone running Linux \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< 0d568258f99f2076ab02e9234cbabbd43e12f30e; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< a508c74ceae2f5a4647f67c362126516d6404ed9; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< 5b47c2f47c2fe921681f4a4fe2790375e6c04cdd; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< bfba288f53192db08c68d4c568db9783fb9cb838; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< 094d1a2121cee1e85ab07d74388f94809dcfb5b9; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< 933ef0d17f012b653e9e6006e3f50c8d0238b5ed; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< 9ca314419930f9135727e39d77e66262d5f7bef6
- Anyone running Linux 5.1

## Description

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

net/mlx5: fs, lock FTE when checking if active

The referenced commits introduced a two-step process for deleting FTEs:

- Lock the FTE, delete it from hardware, set the hardware deletion function
  to NULL and unlock the FTE.
- Lock the parent flow group, delete the software copy of the FTE, and
  remove it from the xarray.

However, this approach encounters a race condition if a rule with the same
match value is added simultaneously. In this scenario, fs\_core may set the
hardware deletion function to NULL prematurely, causing a panic during
subsequent rule deletions.

To prevent this, ensure the active flag of the FTE is checked under a lock,
which will prevent the fs\_core layer from attaching a new steering rule to
an FTE that is in the process of deletion.

\[  438.967589\] MOSHE: 2496 mlx5\_del\_flow\_rules del\_hw\_func
\[  438.968205\] ------------\[ cut here \]------------
\[  438.968654\] refcount\_t: decrement hit 0; leaking memory.
\[  438.969249\] WARNING: CPU: 0 PID: 8957 at lib/refcount.c:31 refcount\_warn\_saturate+0xfb/0x110
\[  438.970054\] Modules linked in: act\_mirred cls\_flower act\_gact sch\_ingress openvswitch nsh mlx5\_vdpa vringh vhost\_iotlb vdpa mlx5\_ib mlx5\_core xt\_conntrack xt\_MASQUERADE nf\_conntrack\_netlink nfnetlink xt\_addrtype iptable\_nat nf\_nat br\_netfilter rpcsec\_gss\_krb5 auth\_rpcgss oid\_registry overlay rpcrdma rdma\_ucm ib\_iser libiscsi scsi\_transport\_iscsi ib\_umad rdma\_cm ib\_ipoib iw\_cm ib\_cm ib\_uverbs ib\_core zram zsmalloc fuse \[last unloaded: cls\_flower\]
\[  438.973288\] CPU: 0 UID: 0 PID: 8957 Comm: tc Not tainted 6.12.0-rc1+ \#8
\[  438.973888\] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
\[  438.974874\] RIP: 0010:refcount\_warn\_saturate+0xfb/0x110
\[  438.975363\] Code: 40 66 3b 82 c6 05 16 e9 4d 01 01 e8 1f 7c a0 ff 0f 0b c3 cc cc cc cc 48 c7 c7 10 66 3b 82 c6 05 fd e8 4d 01 01 e8 05 7c a0 ff \<0f\> 0b c3 cc cc cc cc 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 90
\[  438.976947\] RSP: 0018:ffff888124a53610 EFLAGS: 00010286
\[  438.977446\] RAX: 0000000000000000 RBX: ffff888119d56de0 RCX: 0000000000000000
\[  438.978090\] RDX: ffff88852c828700 RSI: ffff88852c81b3c0 RDI: ffff88852c81b3c0
\[  438.978721\] RBP: ffff888120fa0e88 R08: 0000000000000000 R09: ffff888124a534b0
\[  438.979353\] R10: 0000000000000001 R11: 0000000000000001 R12: ffff888119d56de0
\[  438.979979\] R13: ffff888120fa0ec0 R14: ffff888120fa0ee8 R15: ffff888119d56de0
\[  438.980607\] FS:  00007fe6dcc0f800(0000) GS:ffff88852c800000(0000) knlGS:0000000000000000
\[  438.983984\] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
\[  438.984544\] CR2: 00000000004275e0 CR3: 0000000186982001 CR4: 0000000000372eb0
\[  438.985205\] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
\[  438.985842\] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
\[  438.986507\] Call Trace:
\[  438.986799\]  \<TASK\>
\[  438.987070\]  ? \_\_warn+0x7d/0x110
\[  438.987426\]  ? refcount\_warn\_saturate+0xfb/0x110
\[  438.987877\]  ? report\_bug+0x17d/0x190
\[  438.988261\]  ? prb\_read\_valid+0x17/0x20
\[  438.988659\]  ? handle\_bug+0x53/0x90
\[  438.989054\]  ? exc\_invalid\_op+0x14/0x70
\[  438.989458\]  ? asm\_exc\_invalid\_op+0x16/0x20
\[  438.989883\]  ? refcount\_warn\_saturate+0xfb/0x110
\[  438.990348\]  mlx5\_del\_flow\_rules+0x2f7/0x340 \[mlx5\_core\]
\[  438.990932\]  \_\_mlx5\_eswitch\_del\_rule+0x49/0x170 \[mlx5\_core\]
\[  438.991519\]  ? mlx5\_lag\_is\_sriov+0x3c/0x50 \[mlx5\_core\]
\[  438.992054\]  ? xas\_load+0x9/0xb0
\[  438.992407\]  mlx5e\_tc\_rule\_unoffload+0x45/0xe0 \[mlx5\_core\]
\[  438.993037\]  mlx5e\_tc\_del\_fdb\_flow+0x2a6/0x2e0 \[mlx5\_core\]
\[  438.993623\]  mlx5e\_flow\_put+0x29/0x60 \[mlx5\_core\]
\[  438.994161\]  mlx5e\_delete\_flower+0x261/0x390 \[mlx5\_core\]
\[  438.994728\]  tc\_setup\_cb\_destroy+0xb9/0x190
\[  438.995150\]  fl\_hw\_destroy\_filter+0x94/0xc0 \[cls\_flower\]
\[  438.995650\]  fl\_change+0x11a4/0x13c0 \[cls\_flower\]
\[  438.996105\]  tc\_new\_tfilter+0x347/0xbc0
\[  438.996503\]  ? \_\_
---truncated---

## Affected and fixed versions

- Linux: \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< 0d568258f99f2076ab02e9234cbabbd43e12f30e; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< a508c74ceae2f5a4647f67c362126516d6404ed9; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< 5b47c2f47c2fe921681f4a4fe2790375e6c04cdd; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< bfba288f53192db08c68d4c568db9783fb9cb838; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< 094d1a2121cee1e85ab07d74388f94809dcfb5b9; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< 933ef0d17f012b653e9e6006e3f50c8d0238b5ed; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< 9ca314419930f9135727e39d77e66262d5f7bef6 (cvelist)
- Linux: 5.1 (cvelist)

## Mitigation

- Upgrade Linux to 9ca314419930f9135727e39d77e66262d5f7bef6 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-53121.md
Affected: Linux >= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, < 0d568258f99f2076ab02e9234cbabbd43e12f30e; >= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, < a508c74ceae2f5a4647f67c362126516d6404ed9; >= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, < 5b47c2f47c2fe921681f4a4fe2790375e6c04cdd; >= 718ce4d601dbf73b5dbe024…
Fixed in: Linux 0d568258f99f2076ab02e9234cbabbd43e12f30e, Linux 5b47c2f47c2fe921681f4a4fe2790375e6c04cdd, Linux 094d1a2121cee1e85ab07d74388f94809dcfb5b9, Linux 933ef0d17f012b653e9e6006e3f50c8d0238b5ed, Linux 9ca314419930f9135727e39d77e66262d5f7bef6

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-2024-53121 being exploited?

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

### How serious is CVE-2024-53121?

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

### Which versions are affected by CVE-2024-53121?

Linux \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< 0d568258f99f2076ab02e9234cbabbd43e12f30e; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< a508c74ceae2f5a4647f67c362126516d6404ed9; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< 5b47c2f47c2fe921681f4a4fe2790375e6c04cdd; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< bfba288f53192db08c68d4c568db9783fb9cb838; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< 094d1a2121cee1e85ab07d74388f94809dcfb5b9; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< 933ef0d17f012b653e9e6006e3f50c8d0238b5ed; \>= 718ce4d601dbf73b5dbe024a88c9e34168fe87f2, \< 9ca314419930f9135727e39d77e66262d5f7bef6; Linux 5.1.

### Is there a fix for CVE-2024-53121?

Yes. Fixed in Linux 0d568258f99f2076ab02e9234cbabbd43e12f30e, Linux 5b47c2f47c2fe921681f4a4fe2790375e6c04cdd, Linux 094d1a2121cee1e85ab07d74388f94809dcfb5b9, Linux 933ef0d17f012b653e9e6006e3f50c8d0238b5ed, Linux 9ca314419930f9135727e39d77e66262d5f7bef6. Upgrade Linux to 9ca314419930f9135727e39d77e66262d5f7bef6 or later.

### How do I check if I'm affected by CVE-2024-53121?

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/bfba288f53192db08c68d4c568db9783fb9cb838>
- patch: <https://git.kernel.org/stable/c/094d1a2121cee1e85ab07d74388f94809dcfb5b9>
- patch: <https://git.kernel.org/stable/c/933ef0d17f012b653e9e6006e3f50c8d0238b5ed>
- patch: <https://git.kernel.org/stable/c/9ca314419930f9135727e39d77e66262d5f7bef6>
- other: <https://git.kernel.org/stable/c/0d568258f99f2076ab02e9234cbabbd43e12f30e>
- other: <https://git.kernel.org/stable/c/a508c74ceae2f5a4647f67c362126516d6404ed9>
- other: <https://git.kernel.org/stable/c/5b47c2f47c2fe921681f4a4fe2790375e6c04cdd>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.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-2024-53121>

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