CVE-2022-48858

net/mlx5: Fix a race on command flush flow

HIGH
7
CVSS Score
Published: July 16, 2024 at 12:25 PM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

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>

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v ≥ 5.8.15v < 5.4.1855.11 ≤ v < 5.15.295.16 ≤ v < 5.16.155.4.71 ≤ v < 5.4.1855.5 ≤ v < 5.10.1065.8.15 ≤ v < 5.95.9 ≤ v < 5.10.1065.9 ≤ v < 5.15.295.9 ≤ v < 5.16.155.9 ≤ v < 5.175.4.715.8.155.950b2412b7e7862c5af0cbf4b10d93bc5c712d02173fff8102062cd675170ceb54d90da22fe7e668da87ea137373689dec9d3fafa34a57787320a4b3
Vendor states this is fixed in 0401bfb27a91d7bdd74b1635c1aae57cbb128da6 (fixed)
Vendor states this is fixed in 063bd355595428750803d8736a9bb7c8db67d42d (fixed)
Vendor states this is fixed in 1a4017926eeea56c7540cc41b42106746ee8a0ee (fixed)
Vendor states this is fixed in 7c519f769f555ff7d9d4ccba3497bbb589df360a (fixed)
Vendor states this is fixed in f3331bc17449f15832c31823f27573f4c0e13e5f (fixed)
Vendor states this is fixed in 5.10.106 (unaffected)
Vendor states this is fixed in 5.15.29 (unaffected)
Vendor states this is fixed in 5.16.15 (unaffected)
Vendor states this is fixed in 5.17 (unaffected)
Vendor states this is fixed in 5.4.185 (unaffected)
Vendor states this is fixed in 5.9 (unaffected)

References (5)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0401bfb27a91d7bdd74b1635c1aae57cbb128da6
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/063bd355595428750803d8736a9bb7c8db67d42d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1a4017926eeea56c7540cc41b42106746ee8a0ee
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7c519f769f555ff7d9d4ccba3497bbb589df360a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f3331bc17449f15832c31823f27573f4c0e13e5f

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7HIGHLinux
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-362CWE-416

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card