CVE-2022-49338

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49338
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49338.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-49338
Related
Published
2025-02-26T07:01:10Z
Modified
2025-02-26T07:01:10Z
Summary
[none]
Details

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 draction fwdaction which is shared for all tuples). But currently for uplink, this is happens in reverse, causing the below trace.

CT cleanup is called from: mlx5ecleanupreptx()->mlx5ecleanupuplinkreptx()-> mlx5ereptccleanup()->mlx5etceswcleanup()-> mlx5tcctclean()

Only afterwards, tc cleanup is called from: mlx5ecleanupreptx()->mlx5etchtcleanup() 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/draction.c:1882 mlx5dractiondestroy+0x188/0x1a0 [mlx5core] [ 9443.593349] Modules linked in: actct nfflowtable rdmaucm(O) rdmacm(O) iwcm(O) ibipoib(O) ibcm(O) ibumad(O) mlx5core(O-) mlxfw(O) mlxdevm(O) auxiliary(O) ibuverbs(O) psample ibcore(O) mlxcompat(O) ipgre gre iptunnel actvlan bonding geneve esp6offload esp6 esp4offload esp4 acttunnelkey vxlan ip6udptunnel udptunnel actmirred actskbedit actgact clsflower schingress nfnetlinkcttimeout nfnetlink xfrmuser xfrmalgo 8021q garp stp ipmidevintf mrp ipmimsghandler llc openvswitch nsh nfconncount nfnat mstpciconf(O) dmmultipath sbsagwdt uiopdrvgenirq uio mlxbfpmc mlxbfpka mlxtrio mlxbootctl(O) bluefieldedac schfqcodel iptables ipv6 crcccitt btrfs zstdcompress raid10 raid456 asyncraid6recov asyncmemcpy asyncpq asyncxor asynctx xor xorneon raid6pq raid1 raid0 crct10difce i2cmlxbf gpiomlxbf2 mlxbfgige aesneonbs aesneonblk [last unloaded: mlx5ib] [ 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 : mlx5dractiondestroy+0x188/0x1a0 [mlx5core] [ 9443.593545] lr : mlx5ctfssmfsdestroy+0x24/0x30 [mlx5core] [ 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] mlx5dractiondestroy+0x188/0x1a0 [mlx5core] [ 9443.593688] mlx5ctfssmfsdestroy+0x24/0x30 [mlx5core] [ 9443.593743] mlx5tcctclean+0x34/0xa8 [mlx5core] [ 9443.593797] mlx5etceswcleanup+0x58/0x88 [mlx5core] [ 9443.593851] mlx5ereptccleanup+0x24/0x30 [mlx5core] [ 9443.593905] mlx5ecleanupreptx+0x6c/0x78 [mlx5core] [ 9443.593959] mlx5edetachnetdev+0x74/0x98 [mlx5core] [ 9443.594013] mlx5enetdevchangeprofile+0x70/0x180 [mlx5core] [ 9443.594067] mlx5enetdevattachnicprofile+0x34/0x40 [mlx5core] [ 9443.594122] mlx5evportrepunload+0x15c/0x1a8 [mlx5core] [ 9443.594177] mlx5eswitchunregistervportreps+0x228/0x298 [mlx5core] [ 9443.594231] mlx5erepremove+0x2c/0x38 ---truncated---

References

Affected packages

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.18.5-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.18.5-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}