# CVE-2022-49338: net/mlx5e: CT: Fix cleanup of CT before cleanup of TC ct rules

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; 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:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.24% (percentile 9, 2026-11-26)
- **Published:** 2025-02-26T02:10:56.181Z
- **Modified:** 2026-06-17T05:17:45.640Z

## Who should check

- Anyone running Linux \>= d1a3138f7913014e0714cb1d3d44793d76fc38a1, \< 11bcc79f4bcd244145e6a2c04d5dc755303492a8; \>= d1a3138f7913014e0714cb1d3d44793d76fc38a1, \< 15ef9efa855cf405fadd78272e1e5d04e09a1cf3
- Anyone running Linux 5.18

## Description

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

net/mlx5e: CT: Fix cleanup of CT before cleanup of TC ct rules

CT cleanup assumes that all tc rules were deleted first, and so
is free to delete the CT shared resources (e.g the dr\_action
fwd\_action which is shared for all tuples). But currently for
uplink, this is happens in reverse, causing the below trace.

CT cleanup is called from:
mlx5e\_cleanup\_rep\_tx()-\>mlx5e\_cleanup\_uplink\_rep\_tx()-\>
mlx5e\_rep\_tc\_cleanup()-\>mlx5e\_tc\_esw\_cleanup()-\>
mlx5\_tc\_ct\_clean()

Only afterwards, tc cleanup is called from:
mlx5e\_cleanup\_rep\_tx()-\>mlx5e\_tc\_ht\_cleanup()
which would have deleted all the tc ct rules, and so delete
all the offloaded tuples.

Fix this reversing the order of init and on cleanup, which
will result in tc cleanup then ct cleanup.

\[ 9443.593347\] WARNING: CPU: 2 PID: 206774 at drivers/net/ethernet/mellanox/mlx5/core/steering/dr\_action.c:1882 mlx5dr\_action\_destroy+0x188/0x1a0 \[mlx5\_core\]
\[ 9443.593349\] Modules linked in: act\_ct nf\_flow\_table rdma\_ucm(O) rdma\_cm(O) iw\_cm(O) ib\_ipoib(O) ib\_cm(O) ib\_umad(O) mlx5\_core(O-) mlxfw(O) mlxdevm(O) auxiliary(O) ib\_uverbs(O) psample ib\_core(O) mlx\_compat(O) ip\_gre gre ip\_tunnel act\_vlan bonding geneve esp6\_offload esp6 esp4\_offload esp4 act\_tunnel\_key vxlan ip6\_udp\_tunnel udp\_tunnel act\_mirred act\_skbedit act\_gact cls\_flower sch\_ingress nfnetlink\_cttimeout nfnetlink xfrm\_user xfrm\_algo 8021q garp stp ipmi\_devintf mrp ipmi\_msghandler llc openvswitch nsh nf\_conncount nf\_nat mst\_pciconf(O) dm\_multipath sbsa\_gwdt uio\_pdrv\_genirq uio mlxbf\_pmc mlxbf\_pka mlx\_trio mlx\_bootctl(O) bluefield\_edac sch\_fq\_codel ip\_tables ipv6 crc\_ccitt btrfs zstd\_compress raid10 raid456 async\_raid6\_recov async\_memcpy async\_pq async\_xor async\_tx xor xor\_neon raid6\_pq raid1 raid0 crct10dif\_ce i2c\_mlxbf gpio\_mlxbf2 mlxbf\_gige aes\_neon\_bs aes\_neon\_blk \[last unloaded: mlx5\_ib\]
\[ 9443.593419\] CPU: 2 PID: 206774 Comm: modprobe Tainted: G           O      5.4.0-1023.24.gc14613d-bluefield \#1
\[ 9443.593422\] Hardware name: https://www.mellanox.com BlueField SoC/BlueField SoC, BIOS BlueField:143ebaf Jan 11 2022
\[ 9443.593424\] pstate: 20000005 (nzCv daif -PAN -UAO)
\[ 9443.593489\] pc : mlx5dr\_action\_destroy+0x188/0x1a0 \[mlx5\_core\]
\[ 9443.593545\] lr : mlx5\_ct\_fs\_smfs\_destroy+0x24/0x30 \[mlx5\_core\]
\[ 9443.593546\] sp : ffff8000135dbab0
\[ 9443.593548\] x29: ffff8000135dbab0 x28: ffff0003a6ab8e80
\[ 9443.593550\] x27: 0000000000000000 x26: ffff0003e07d7000
\[ 9443.593552\] x25: ffff800009609de0 x24: ffff000397fb2120
\[ 9443.593554\] x23: ffff0003975c0000 x22: 0000000000000000
\[ 9443.593556\] x21: ffff0003975f08c0 x20: ffff800009609de0
\[ 9443.593558\] x19: ffff0003c8a13380 x18: 0000000000000014
\[ 9443.593560\] x17: 0000000067f5f125 x16: 000000006529c620
\[ 9443.593561\] x15: 000000000000000b x14: 0000000000000000
\[ 9443.593563\] x13: 0000000000000002 x12: 0000000000000001
\[ 9443.593565\] x11: ffff800011108868 x10: 0000000000000000
\[ 9443.593567\] x9 : 0000000000000000 x8 : ffff8000117fb270
\[ 9443.593569\] x7 : ffff0003ebc01288 x6 : 0000000000000000
\[ 9443.593571\] x5 : ffff800009591ab8 x4 : fffffe000f6d9a20
\[ 9443.593572\] x3 : 0000000080040001 x2 : fffffe000f6d9a20
\[ 9443.593574\] x1 : ffff8000095901d8 x0 : 0000000000000025
\[ 9443.593577\] Call trace:
\[ 9443.593634\]  mlx5dr\_action\_destroy+0x188/0x1a0 \[mlx5\_core\]
\[ 9443.593688\]  mlx5\_ct\_fs\_smfs\_destroy+0x24/0x30 \[mlx5\_core\]
\[ 9443.593743\]  mlx5\_tc\_ct\_clean+0x34/0xa8 \[mlx5\_core\]
\[ 9443.593797\]  mlx5e\_tc\_esw\_cleanup+0x58/0x88 \[mlx5\_core\]
\[ 9443.593851\]  mlx5e\_rep\_tc\_cleanup+0x24/0x30 \[mlx5\_core\]
\[ 9443.593905\]  mlx5e\_cleanup\_rep\_tx+0x6c/0x78 \[mlx5\_core\]
\[ 9443.593959\]  mlx5e\_detach\_netdev+0x74/0x98 \[mlx5\_core\]
\[ 9443.594013\]  mlx5e\_netdev\_change\_profile+0x70/0x180 \[mlx5\_core\]
\[ 9443.594067\]  mlx5e\_netdev\_attach\_nic\_profile+0x34/0x40 \[mlx5\_core\]
\[ 9443.594122\]  mlx5e\_vport\_rep\_unload+0x15c/0x1a8 \[mlx5\_core\]
\[ 9443.594177\]  mlx5\_eswitch\_unregister\_vport\_reps+0x228/0x298 \[mlx5\_core\]
\[ 9443.594231\]  mlx5e\_rep\_remove+0x2c/0x38
---truncated---

## Affected and fixed versions

- Linux: \>= d1a3138f7913014e0714cb1d3d44793d76fc38a1, \< 11bcc79f4bcd244145e6a2c04d5dc755303492a8; \>= d1a3138f7913014e0714cb1d3d44793d76fc38a1, \< 15ef9efa855cf405fadd78272e1e5d04e09a1cf3 (cvelist)
- Linux: 5.18 (cvelist)

## Mitigation

- Upgrade Linux to 15ef9efa855cf405fadd78272e1e5d04e09a1cf3 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-49338.md
Affected: Linux >= d1a3138f7913014e0714cb1d3d44793d76fc38a1, < 11bcc79f4bcd244145e6a2c04d5dc755303492a8; >= d1a3138f7913014e0714cb1d3d44793d76fc38a1, < 15ef9efa855cf405fadd78272e1e5d04e09a1cf3; Linux 5.18
Fixed in: Linux 11bcc79f4bcd244145e6a2c04d5dc755303492a8, Linux 15ef9efa855cf405fadd78272e1e5d04e09a1cf3

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-2022-49338 being exploited?

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

### How serious is CVE-2022-49338?

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

### Which versions are affected by CVE-2022-49338?

Linux \>= d1a3138f7913014e0714cb1d3d44793d76fc38a1, \< 11bcc79f4bcd244145e6a2c04d5dc755303492a8; \>= d1a3138f7913014e0714cb1d3d44793d76fc38a1, \< 15ef9efa855cf405fadd78272e1e5d04e09a1cf3; Linux 5.18.

### Is there a fix for CVE-2022-49338?

Yes. Fixed in Linux 11bcc79f4bcd244145e6a2c04d5dc755303492a8, Linux 15ef9efa855cf405fadd78272e1e5d04e09a1cf3. Upgrade Linux to 15ef9efa855cf405fadd78272e1e5d04e09a1cf3 or later.

### How do I check if I'm affected by CVE-2022-49338?

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/11bcc79f4bcd244145e6a2c04d5dc755303492a8>
- patch: <https://git.kernel.org/stable/c/15ef9efa855cf405fadd78272e1e5d04e09a1cf3>

## 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-2022-49338>

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