{"id":69975,"date":"2025-09-11T22:32:26","date_gmt":"2025-09-11T19:02:26","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-39790-bus-mhi-host-detect-events-pointing-to-unexpected-tres\/"},"modified":"2025-09-11T22:32:26","modified_gmt":"2025-09-11T19:02:26","slug":"cve-2025-39790-bus-mhi-host-detect-events-pointing-to-unexpected-tres","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-39790-bus-mhi-host-detect-events-pointing-to-unexpected-tres\/","title":{"rendered":"CVE-2025-39790 &#8211; bus: mhi: host: Detect events pointing to unexpected TREs"},"content":{"rendered":"<p><strong>CVE ID : <\/strong>CVE-2025-39790<br \/>\n<br \/>\n<strong>Published : <\/strong> Sept. 11, 2025, 5:15 p.m. | 1\u00a0hour, 26\u00a0minutes ago<br \/>\n<br \/>\n<strong>Description : <\/strong>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>bus: mhi: host: Detect events pointing to unexpected TREs<\/p>\n<p>When a remote device sends a completion event to the host, it contains a<br \/>\npointer to the consumed TRE. The host uses this pointer to process all of<br \/>\nthe TREs between it and the host&#8217;s local copy of the ring&#8217;s read pointer.<br \/>\nThis works when processing completion for chained transactions, but can<br \/>\nlead to nasty results if the device sends an event for a single-element<br \/>\ntransaction with a read pointer that is multiple elements ahead of the<br \/>\nhost&#8217;s read pointer.<\/p>\n<p>For instance, if the host accesses an event ring while the device is<br \/>\nupdating it, the pointer inside of the event might still point to an old<br \/>\nTRE. If the host uses the channel&#8217;s xfer_cb() to directly free the buffer<br \/>\npointed to by the TRE, the buffer will be double-freed.<\/p>\n<p>This behavior was observed on an ep that used upstream EP stack without<br \/>\n&#8216;commit 6f18d174b73d (&#8220;bus: mhi: ep: Update read pointer only after buffer<br \/>\nis written&#8221;)&#8217;. Where the device updated the events ring pointer before<br \/>\nupdating the event contents, so it left a window where the host was able to<br \/>\naccess the stale data the event pointed to, before the device had the<br \/>\nchance to update them. The usual pattern was that the host received an<br \/>\nevent pointing to a TRE that is not immediately after the last processed<br \/>\none, so it got treated as if it was a chained transaction, processing all<br \/>\nof the TREs in between the two read pointers.<\/p>\n<p>This commit aims to harden the host by ensuring transactions where the<br \/>\nevent points to a TRE that isn&#8217;t local_rp + 1 are chained.<\/p>\n[mani: added stable tag and reworded commit message]\n<br \/>\n<strong>Severity:<\/strong> 0.0 | NA<br \/>\n<br \/>\nVisit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID : CVE-2025-39790 Published : Sept. 11, 2025, 5:15 p.m. | 1\u00a0hour, 26\u00a0minutes ago Description : 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. &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-69975","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/69975","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=69975"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/69975\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=69975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=69975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=69975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}