CVE-2022-48858 json
net/mlx5: Fix a race on command flush flow
published 2024-07-16 2 y ago modified 2026-08-05 3 mo ago also EUVD-2022-53737
- cvss
- 7.0
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 7%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: Fix a race on command flush flow
Fix a refcount use after free warning due to a race on command entry. Such race occurs when one of the commands releases its last refcount and frees its index and entry while another process running command flush flow takes refcount to this command entry. The process which handles commands flush may see this command as needed to be flushed if the other process released its refcount but didn't release the index yet. Fix it by adding the needed spin lock.
It fixes the following warning trace:
refcount_t: addition on 0; use-after-free. WARNING: CPU: 11 PID: 540311 at lib/refcount.c:25 refcount_warn_saturate+0x80/0xe0 ... RIP: 0010:refcount_warn_saturate+0x80/0xe0 ... Call Trace: <TASK> mlx5_cmd_trigger_completions+0x293/0x340 [mlx5_core] mlx5_cmd_flush+0x3a/0xf0 [mlx5_core] enter_error_state+0x44/0x80 [mlx5_core] mlx5_fw_fatal_reporter_err_work+0x37/0xe0 [mlx5_core] process_one_work+0x1be/0x390 worker_thread+0x4d/0x3d0 ? rescuer_thread+0x350/0x350 kthread+0x141/0x160 ? set_kthread_struct+0x40/0x40 ret_from_fork+0x1f/0x30 </TASK>
Patch / fix
- Linux Linux 5.4.185, 5.9, 5.10.106, 5.15.29, 5.16.15, 5.17
- linux Debian 14, Debian 13, Debian 12 5.16.18-1
debian advisories DEBIAN-CVE-2022-48858
- linux Ubuntu 20.04 LTS 5.4.0-117.132
- linux-aws Ubuntu 20.04 LTS 5.4.0-1078.84
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1078.84
- linux-ibm Ubuntu 20.04 LTS 5.4.0-1026.29
- linux-iot Ubuntu 20.04 LTS 5.4.0-1004.6
- linux-kvm Ubuntu 20.04 LTS 5.4.0-1068.72
- linux-azure Ubuntu 20.04 LTS 5.4.0-1083.87
- linux-gkeop Ubuntu 20.04 LTS 5.4.0-1046.48
ubuntu advisories UBUNTU-CVE-2022-48858
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel-64kb SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS, Enterprise Storage 7.1 5.3.18-150300.59.174.1
- kernel-syms SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS +1 more 5.3.18-150300.59.174.1
- kernel-source SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS +1 more 5.3.18-150300.59.174.1
- kernel-default SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE Micro 5.2 +5 more 5.3.18-150300.59.174.1
- kernel-preempt SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS +1 more 5.3.18-150300.59.174.1
- kernel-obs-build SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS +1 more 5.3.18-150300.59.174.1
- kernel-default-base SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE Micro 5.2 +3 more 5.3.18-150300.59.174.1.150300.18.103.1
- kernel-rt SLE Micro 5.2, SLE Micro 5.1 5.3.18-150300.181.2
suse advisories SUSE-SU-2024:3249-1SUSE-SU-2024:3225-1SUSE-SU-2024:2947-1SUSE-SU-2024:2939-1SUSE-SU-2024:2929-1SUSE-SU-2024:2902-1
- git.kernel.org/stable/c/1a4017926eeea56c7540cc41b42106746ee8a0ee commit
- git.kernel.org/stable/c/f3331bc17449f15832c31823f27573f4c0e13e5f commit
- git.kernel.org/stable/c/7c519f769f555ff7d9d4ccba3497bbb589df360a commit
- git.kernel.org/stable/c/0401bfb27a91d7bdd74b1635c1aae57cbb128da6 commit
- git.kernel.org/stable/c/063bd355595428750803d8736a9bb7c8db67d42d commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-48858 updated cvss 5.2
kernel: net/mlx5: Fix a race on command flush flow
-
Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 moreaffected: workaround, no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 moreaffected: workaround, no fix planned “Will not fix”
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.18% chance of exploitation in the next 30 days, higher than 7% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 7.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected products
- Linux Linux
Classification
- Weakness
- Technology feeds
References
-
git.kernel.org
/stable/c/1a4017926eeea56c7540cc41b42106746ee8a0ee
patch
-
git.kernel.org
/stable/c/f3331bc17449f15832c31823f27573f4c0e13e5f
patch
-
git.kernel.org
/stable/c/7c519f769f555ff7d9d4ccba3497bbb589df360a
patch
-
git.kernel.org
/stable/c/0401bfb27a91d7bdd74b1635c1aae57cbb128da6
patch
-
git.kernel.org
/stable/c/063bd355595428750803d8736a9bb7c8db67d42d
patch
Sources
- CVE List CVE-2022-48858
- NVD CVE-2022-48858
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.