CVE-2022-48858

net/mlx5: Fix a race on command flush flow

7.0 high EPSS 0.18%

Published 16 Jul 2024 Updated 5 Aug 2026 CNA: Linux

Check your servers for CVE-2022-48858

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-48858 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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>

Severity (CVSS)

7.0 high CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
high: an attack depends on conditions outside the control of the attacker, such as a race
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.18%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 7.71% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 10 Sep 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 073fff8102062cd675170ceb54d90da22fe7e668, before 1a4017926eeea56c7540cc41b42106746ee8a0ee
affected from 50b2412b7e7862c5af0cbf4b10d93bc5c712d021, before f3331bc17449f15832c31823f27573f4c0e13e5f
affected from 50b2412b7e7862c5af0cbf4b10d93bc5c712d021, before 7c519f769f555ff7d9d4ccba3497bbb589df360a
affected from 50b2412b7e7862c5af0cbf4b10d93bc5c712d021, before 0401bfb27a91d7bdd74b1635c1aae57cbb128da6
affected from 50b2412b7e7862c5af0cbf4b10d93bc5c712d021, before 063bd355595428750803d8736a9bb7c8db67d42d
affected da87ea137373689dec9d3fafa34a57787320a4b3
affected from 5.4.71, before 5.4.185
affected from 5.8.15, before 5.9
Other versions: unaffected
Linux
affected 5.9
unaffected before 5.9
unaffected from 5.4.185 up to and including 5.4.*
unaffected from 5.10.106 up to and including 5.10.*
unaffected from 5.15.29 up to and including 5.15.*
unaffected from 5.16.15 up to and including 5.16.*
unaffected 5.17 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2022-48858 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-48858

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2022-48858
trivy image --scanners vuln IMAGE | grep CVE-2022-48858

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2022-48858 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.