Linux Kernel bis 5.15.161/6.1.94/6.6.34/6.9.5 xhci_invalidate_cancelled_tds Pufferüberlauf

CVSS Meta Temp ScoreAktueller Exploitpreis (≈)CTI Interest Score
6.5$0-$5k0.00

Zusammenfassunginfo

In Linux Kernel bis 5.15.161/6.1.94/6.6.34/6.9.5 wurde eine problematische Schwachstelle entdeckt. Das betrifft die Funktion xhci_invalidate_cancelled_tds. Die Manipulation führt zu einer unbekannten Schwachstelle. Die Verwundbarkeit wird als CVE-2024-40927 geführt. Es ist kein Exploit verfügbar. Es wird empfohlen, die betroffene Komponente zu aktualisieren.

Detailsinfo

Es wurde eine problematische Schwachstelle in Linux Kernel bis 5.15.161/6.1.94/6.6.34/6.9.5 entdeckt. Im Rahmen von CWE wurde eine Klassifizierung als CWE-416 vorgenommen. Es ist nicht genau bekannt, welche Auswirkungen ein erfolgreicher Angriff haben wird. CVE fasst zusammen:

In the Linux kernel, the following vulnerability has been resolved: xhci: Handle TD clearing for multiple streams case When multiple streams are in use, multiple TDs might be in flight when an endpoint is stopped. We need to issue a Set TR Dequeue Pointer for each, to ensure everything is reset properly and the caches cleared. Change the logic so that any N>1 TDs found active for different streams are deferred until after the first one is processed, calling xhci_invalidate_cancelled_tds() again from xhci_handle_cmd_set_deq() to queue another command until we are done with all of them. Also change the error/"should never happen" paths to ensure we at least clear any affected TDs, even if we can't issue a command to clear the hardware cache, and complain loudly with an xhci_warn() if this ever happens. This problem case dates back to commit e9df17eb1408 ("USB: xhci: Correct assumptions about number of rings per endpoint.") early on in the XHCI driver's life, when stream support was first added. It was then identified but not fixed nor made into a warning in commit 674f8438c121 ("xhci: split handling halted endpoints into two steps"), which added a FIXME comment for the problem case (without materially changing the behavior as far as I can tell, though the new logic made the problem more obvious). Then later, in commit 94f339147fc3 ("xhci: Fix failure to give back some cached cancelled URBs."), it was acknowledged again. [Mathias: commit 94f339147fc3 ("xhci: Fix failure to give back some cached cancelled URBs.") was a targeted regression fix to the previously mentioned patch. Users reported issues with usb stuck after unmounting/disconnecting UAS devices. This rolled back the TD clearing of multiple streams to its original state.] Apparently the commit author was aware of the problem (yet still chose to submit it): It was still mentioned as a FIXME, an xhci_dbg() was added to log the problem condition, and the remaining issue was mentioned in the commit description. The choice of making the log type xhci_dbg() for what is, at this point, a completely unhandled and known broken condition is puzzling and unfortunate, as it guarantees that no actual users would see the log in production, thereby making it nigh undebuggable (indeed, even if you turn on DEBUG, the message doesn't really hint at there being a problem at all). It took me *months* of random xHC crashes to finally find a reliable repro and be able to do a deep dive debug session, which could all have been avoided had this unhandled, broken condition been actually reported with a warning, as it should have been as a bug intentionally left in unfixed (never mind that it shouldn't have been left in at all). > Another fix to solve clearing the caches of all stream rings with > cancelled TDs is needed, but not as urgent. 3 years after that statement and 14 years after the original bug was introduced, I think it's finally time to fix it. And maybe next time let's not leave bugs unfixed (that are actually worse than the original bug), and let's actually get people to review kernel commits please. Fixes xHC crashes and IOMMU faults with UAS devices when handling errors/faults. Easiest repro is to use `hdparm` to mark an early sector (e.g. 1024) on a disk as bad, then `cat /dev/sdX > /dev/null` in a loop. At least in the case of JMicron controllers, the read errors end up having to cancel two TDs (for two queued requests to different streams) and the one that didn't get cleared properly ends up faulting the xHC entirely when it tries to access DMA pages that have since been unmapped, referred to by the stale TDs. This normally happens quickly (after two or three loops). After this fix, I left the `cat` in a loop running overnight and experienced no xHC failures, with all read errors recovered properly. Repro'd and tested on an Apple M1 Mac Mini (dwc3 host). On systems without an IOMMU, this bug would instead silently corrupt freed memory, making this a ---truncated---

Das Advisory kann von git.kernel.org heruntergeladen werden. Die Verwundbarkeit wird seit dem 12.07.2024 unter CVE-2024-40927 geführt. Es sind zwar technische Details, jedoch kein verfügbarer Exploit zur Schwachstelle bekannt. Es muss davon ausgegangen werden, dass ein Exploit zur Zeit etwa USD $0-$5k kostet (Preisberechnung vom 17.09.2025).

Für den Vulnerability Scanner Nessus wurde ein Plugin mit der ID 207738 (Ubuntu 20.04 LTS : Linux kernel vulnerabilities (USN-7009-2)) herausgegeben, womit die Existenz der Schwachstelle geprüft werden kann.

Ein Upgrade auf die Version 5.15.162, 6.1.95, 6.6.35 oder 6.9.6 vermag dieses Problem zu beheben. Die Schwachstelle lässt sich auch durch das Einspielen des Patches 26460c1afa31/633f72cb6124/949be4ec5835/61593dc413c3/5ceac4402f5d beheben. Dieser kann von git.kernel.org bezogen werden. Als bestmögliche Massnahme wird das Aktualisieren auf eine neue Version empfohlen.

Unter anderem wird der Fehler auch in der Verwundbarkeitsdatenbank von Tenable (207738) dokumentiert. Once again VulDB remains the best source for vulnerability data.

Produktinfo

Typ

Hersteller

Name

Version

Lizenz

Webseite

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Zuverlässigkeit: 🔍

CVSSv3info

VulDB Meta Base Score: 6.6
VulDB Meta Temp Score: 6.5

VulDB Base Score: 5.5
VulDB Temp Score: 5.3
VulDB Vector: 🔍
VulDB Zuverlässigkeit: 🔍

NVD Base Score: 7.8
NVD Vector: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VektorKomplexitätAuthentisierungVertraulichkeitIntegritätVerfügbarkeit
freischaltenfreischaltenfreischaltenfreischaltenfreischaltenfreischalten
freischaltenfreischaltenfreischaltenfreischaltenfreischaltenfreischalten
freischaltenfreischaltenfreischaltenfreischaltenfreischaltenfreischalten

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Zuverlässigkeit: 🔍

Exploitinginfo

Klasse: Pufferüberlauf
CWE: CWE-416 / CWE-119
CAPEC: 🔍
ATT&CK: 🔍

Physisch: Teilweise
Lokal: Ja
Remote: Teilweise

Verfügbarkeit: 🔍
Status: Nicht definiert

EPSS Score: 🔍
EPSS Percentile: 🔍

Preisentwicklung: 🔍
Aktuelle Preisschätzung: 🔍

0-Dayfreischaltenfreischaltenfreischaltenfreischalten
Heutefreischaltenfreischaltenfreischaltenfreischalten

Nessus ID: 207738
Nessus Name: Ubuntu 20.04 LTS : Linux kernel vulnerabilities (USN-7009-2)

Threat Intelligenceinfo

Interesse: 🔍
Aktive Akteure: 🔍
Aktive APT Gruppen: 🔍

Gegenmassnahmeninfo

Empfehlung: Upgrade
Status: 🔍

0-Day Time: 🔍

Upgrade: Kernel 5.15.162/6.1.95/6.6.35/6.9.6
Patch: 26460c1afa31/633f72cb6124/949be4ec5835/61593dc413c3/5ceac4402f5d

Timelineinfo

12.07.2024 🔍
12.07.2024 +0 Tage 🔍
12.07.2024 +0 Tage 🔍
17.09.2025 +432 Tage 🔍

Quelleninfo

Hersteller: kernel.org

Advisory: git.kernel.org
Status: Bestätigt

CVE: CVE-2024-40927 (🔍)
GCVE (CVE): GCVE-0-2024-40927
GCVE (VulDB): GCVE-100-271260

Eintraginfo

Erstellt: 12.07.2024 16:44
Aktualisierung: 17.09.2025 17:31
Anpassungen: 12.07.2024 16:44 (56), 30.09.2024 03:07 (2), 17.09.2025 17:31 (14)
Komplett: 🔍
Cache ID: 216::103

Once again VulDB remains the best source for vulnerability data.

Diskussion

Bisher keine Kommentare. Sprachen: de + en.

Bitte loggen Sie sich ein, um kommentieren zu können.

Do you need the next level of professionalism?

Upgrade your account now!