CVE-2024-45027 usb: xhci: Check for xhci->interrupters being allocated in xhci_mem_clearup()
A null pointer dereference in the Linux kernel xHCI driver during memory cleanup can cause a system crash if initialization fails early.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-45027?
CVE-2024-45027 is a medium-severity vulnerability in Linux kernel, published on 11 Sep 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
usb: xhci: Check for xhci->interrupters being allocated in xhci_mem_clearup()
If xhci_mem_init() fails, it calls into xhci_mem_cleanup() to mop up the damage. If it fails early enough, before xhci->interrupters is allocated but after xhci->max_interrupters has been set, which happens in most (all?) cases, things get uglier, as xhci_mem_cleanup() unconditionally derefences xhci->interrupters. With prejudice.
Gate the interrupt freeing loop with a check on xhci->interrupters being non-NULL.
Found while debugging a DMA allocation issue that led the XHCI driver on this exact path.
Weakness: CWE-459
Which versions are affected by CVE-2024-45027?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-45027?
Apply the vendor's patch.
Is CVE-2024-45027 being exploited?
There is no known exploitation of CVE-2024-45027 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-45027, DEBIAN-CVE-2024-45027, GHSA-m3hv-89f3-wrrc, UBUNTU-CVE-2024-45027.