CVE-2024-38555: net/mlx5: Discard command completions in internal error
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: Discard command completions in internal error
Fix use after free when FW completion arrives while device is in
internal error state. Avoid calling completion handler in this case,
since the device will flush the command interface and trigger all
completions manually.
Kernel log:
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
...
RIP: 0010:refcount_warn_saturate+0xd8/0xe0
...
Call Trace:
<IRQ>
? __warn+0x79/0x120
? refcount_warn_saturate+0xd8/0xe0
? report_bug+0x17c/0x190
? handle_bug+0x3c/0x60
? exc_invalid_op+0x14/0x70
? asm_exc_invalid_op+0x16/0x20
? refcount_warn_saturate+0xd8/0xe0
cmd_ent_put+0x13b/0x160 [mlx5_core]
mlx5_cmd_comp_handler+0x5f9/0x670 [mlx5_core]
cmd_comp_notifier+0x1f/0x30 [mlx5_core]
notifier_call_chain+0x35/0xb0
atomic_notifier_call_chain+0x16/0x20
mlx5_eq_async_int+0xf6/0x290 [mlx5_core]
notifier_call_chain+0x35/0xb0
atomic_notifier_call_chain+0x16/0x20
irq_int_handler+0x19/0x30 [mlx5_core]
__handle_irq_event_percpu+0x4b/0x160
handle_irq_event+0x2e/0x80
handle_edge_irq+0x98/0x230
__common_interrupt+0x3b/0xa0
common_interrupt+0x7b/0xa0
</IRQ>
<TASK>
asm_common_interrupt+0x22/0x40
Security readout for executives and security teams
Plain-English summary
A Linux mlx5 network-driver flaw can mishandle a firmware completion during an internal device error, accessing memory after it was freed. This can crash or corrupt the host and, under the supplied CVSS assessment, may affect confidentiality, integrity, and availability. Exploitation requires local access, privileges, and a difficult timing or state condition.
Executive priority
Treat this as a high-priority, targeted kernel update for affected mlx5 systems, especially critical infrastructure. It is not evidenced as an internet-wide or actively exploited emergency. Accelerate inventory and patch verification because successful memory corruption could have severe host impact, while recognizing that local privileges and a difficult trigger reduce immediate likelihood.
Technical view
When mlx5 firmware reports a command completion while the device is in an internal error state, mlx5_core may invoke a completion handler for an entry the command-interface flush also completes, causing reference-count underflow and use-after-free. The stable fix discards firmware completions in this state and lets the command-interface flush trigger completions.
Likely exposure
Exposure is limited to Linux systems using mlx5_core on a vulnerable kernel build. The supplied version list is irregular and mixes releases with commit identifiers, so version strings alone are insufficient. Confirm whether each deployed vendor kernel contains an applicable referenced fix.
Exploitation context
The supplied CVSS 3.1 vector scores this 7.0: local access, low privileges, high complexity, and no user interaction, with potentially high impact. The bundle marks KEV false and provides no evidence of active exploitation or a public exploit. The triggering internal-error and firmware-completion state may constrain practical exploitation.
Researcher notes
The decisive condition is a firmware command completion arriving while mlx5 reports internal error. The fix suppresses that handler because command-interface flushing manually completes outstanding commands. The bundle demonstrates a reference-count underflow and use-after-free but does not establish attacker-controlled memory effects, reliable exploitation, affected hardware models, or distribution-specific backport status.
Mitigation direction
Update to a vendor-supported kernel containing the applicable stable fix.
Match vendor kernel builds against the referenced Linux stable commits.
Prioritize hosts actively using mlx5_core and carrying sensitive or availability-critical workloads.
Consult distribution guidance where backport status cannot be established from version numbers.
Validation and detection
Inventory running kernel builds on systems using mlx5_core.
Confirm each build contains its branch-appropriate referenced stable fix.
Review kernel logs for refcount underflow, use-after-free, or the supplied mlx5_core call trace.
Verify patched systems operate normally through controlled device-error recovery testing.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-38555 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.