CVE-2025-39790: bus: mhi: host: Detect events pointing to unexpected TREs
In the Linux kernel, the following vulnerability has been resolved:
bus: mhi: host: Detect events pointing to unexpected TREs
When a remote device sends a completion event to the host, it contains a
pointer to the consumed TRE. The host uses this pointer to process all of
the TREs between it and the host's local copy of the ring's read pointer.
This works when processing completion for chained transactions, but can
lead to nasty results if the device sends an event for a single-element
transaction with a read pointer that is multiple elements ahead of the
host's read pointer.
For instance, if the host accesses an event ring while the device is
updating it, the pointer inside of the event might still point to an old
TRE. If the host uses the channel's xfer_cb() to directly free the buffer
pointed to by the TRE, the buffer will be double-freed.
This behavior was observed on an ep that used upstream EP stack without
'commit 6f18d174b73d ("bus: mhi: ep: Update read pointer only after buffer
is written")'. Where the device updated the events ring pointer before
updating the event contents, so it left a window where the host was able to
access the stale data the event pointed to, before the device had the
chance to update them. The usual pattern was that the host received an
event pointing to a TRE that is not immediately after the last processed
one, so it got treated as if it was a chained transaction, processing all
of the TREs in between the two read pointers.
This commit aims to harden the host by ensuring transactions where the
event points to a TRE that isn't local_rp + 1 are chained.
[mani: added stable tag and reworded commit message]
Security readout for executives and security teams
Plain-English summary
A faulty or out-of-sync MHI-connected device can make a Linux host process the wrong transfer entries. This may double-free memory, potentially crashing the system or corrupting kernel memory. Confidentiality, integrity, and availability impacts are possible, but exposure requires the affected MHI host path and device interaction.
Executive priority
Treat as a high-priority platform maintenance issue on systems that actually use MHI host functionality. Expedite remediation where endpoints are untrusted, field-replaceable, or operationally critical. Systems without the affected driver path are unlikely to be exposed, so asset-specific validation should precede emergency action.
Technical view
The Linux MHI host driver trusted completion-event pointers that could reference an unexpected transfer ring element. Stale or improperly ordered device events could be mistaken for chained transactions, causing intervening entries to be processed and buffers freed twice. The kernel fix validates that non-sequential completion pointers correspond to chained transactions.
Likely exposure
Exposure is limited to Linux systems using the affected MHI host functionality with a connected remote endpoint. The supplied record identifies affected Linux versions beginning at 5.7 and multiple maintained branches, but its version presentation is ambiguous. Confirm exact vulnerable and fixed builds through kernel or distribution advisories.
Exploitation context
The CVSS vector indicates local attack proximity, low complexity, no required privileges, and no user interaction. A malicious, faulty, or racing MHI endpoint may trigger the condition. The supplied bundle marks this CVE as absent from KEV, and the cited information does not establish active exploitation.
Researcher notes
The observed failure involved an endpoint updating its event-ring pointer before event contents, exposing stale TRE data. Host processing could advance across unintended entries and invoke transfer callbacks that free buffers twice. The hardening rejects unexpected TRE progression unless the transaction is chained. Public evidence supplied here does not demonstrate exploitability beyond the described memory-safety impact.
Mitigation direction
Apply the appropriate fixed Linux kernel supplied by the system or device vendor.
Check Linux stable, distribution, and appliance advisories for exact patched build numbers.
Restrict untrusted or unnecessary MHI-connected devices where operationally feasible.
Prioritize affected systems whose MHI endpoints cross meaningful trust boundaries.
Validation and detection
Inventory systems using the Linux MHI host driver and identify attached endpoints.
Record running kernel versions, distribution revisions, and vendor firmware baselines.
Compare each build against applicable Linux stable or distribution remediation guidance.
Review kernel logs and crash records for MHI-related faults or memory-corruption symptoms.
After updating, confirm the patched kernel is running following reboot.
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-2025-39790 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.
1CVSS vectors
3Timeline events
2ADP providers
9Source links
CVSS vector scores
1 official score
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.