{
  "id": "CVE-2025-39790",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-39790",
  "published_at": "2025-09-11T16:56:38.643Z",
  "title": "bus: mhi: host: Detect events pointing to unexpected TREs",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 8.4,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nbus: mhi: host: Detect events pointing to unexpected TREs\n\nWhen a remote device sends a completion event to the host, it contains a\npointer to the consumed TRE. The host uses this pointer to process all of\nthe TREs between it and the host's local copy of the ring's read pointer.\nThis works when processing completion for chained transactions, but can\nlead to nasty results if the device sends an event for a single-element\ntransaction with a read pointer that is multiple elements ahead of the\nhost's read pointer.\n\nFor instance, if the host accesses an event ring while the device is\nupdating it, the pointer inside of the event might still point to an old\nTRE. If the host uses the channel's xfer_cb() to directly free the buffer\npointed to by the TRE, the buffer will be double-freed.\n\nThis behavior was observed on an ep that used upstream EP stack without\n'commit 6f18d174b73d (\"bus: mhi: ep: Update read pointer only after buffer\nis written\")'. Where the device updated the events ring pointer before\nupdating the event contents, so it left a window where the host was able to\naccess the stale data the event pointed to, before the device had the\nchance to update them. The usual pattern was that the host received an\nevent pointing to a TRE that is not immediately after the last processed\none, so it got treated as if it was a chained transaction, processing all\nof the TREs in between the two read pointers.\n\nThis commit aims to harden the host by ensuring transactions where the\nevent points to a TRE that isn't local_rp + 1 are chained.\n\n[mani: added stable tag and reworded commit message]",
  "cwe": "CWE-415",
  "cpes": [
    "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 8.4,
    "nvd": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 1d3173a3bae7039b765a0956e3e4bf846dbaacb8, \u003c 7b3f0e3b60c27f4fcb69927d84987e5fd6240530",
          "\u003e= 1d3173a3bae7039b765a0956e3e4bf846dbaacb8, \u003c 4079c6c59705b96285219b9efc63cab870d757b7",
          "\u003e= 1d3173a3bae7039b765a0956e3e4bf846dbaacb8, \u003c 5e17429679a8545afe438ce7a82a13a54e8ceabb",
          "\u003e= 1d3173a3bae7039b765a0956e3e4bf846dbaacb8, \u003c 2ec99b922f4661521927eeada76f431eebfbabc4",
          "\u003e= 1d3173a3bae7039b765a0956e3e4bf846dbaacb8, \u003c 44e1a079e18f78d6594a715b0c6d7e18c656f7b9",
          "\u003e= 1d3173a3bae7039b765a0956e3e4bf846dbaacb8, \u003c 5bd398e20f0833ae8a1267d4f343591a2dd20185"
        ],
        "fixed_in": [
          "7b3f0e3b60c27f4fcb69927d84987e5fd6240530",
          "4079c6c59705b96285219b9efc63cab870d757b7",
          "5e17429679a8545afe438ce7a82a13a54e8ceabb",
          "2ec99b922f4661521927eeada76f431eebfbabc4",
          "44e1a079e18f78d6594a715b0c6d7e18c656f7b9",
          "5bd398e20f0833ae8a1267d4f343591a2dd20185"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "5.7"
        ],
        "fixed_in": [
          "0",
          "5.15.190",
          "6.1.149",
          "6.6.103",
          "6.12.44",
          "6.16.4",
          "6.17"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 7b3f0e3b60c27f4fcb69927d84987e5fd6240530 or 4079c6c59705b96285219b9efc63cab870d757b7 or 5e17429679a8545afe438ce7a82a13a54e8ceabb or 2ec99b922f4661521927eeada76f431eebfbabc4 or 44e1a079e18f78d6594a715b0c6d7e18c656f7b9 or 5bd398e20f0833ae8a1267d4f343591a2dd20185 or later.",
      "Upgrade Linux to 0 or 5.15.190 or 6.1.149 or 6.6.103 or 6.12.44 or 6.16.4 or 6.17 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
