CVE-2024-47751 PCI: kirin: Fix buffer overflow in kirin_pcie_parse_port()
A buffer overflow in the Linux kernel's Kirin PCIe driver allows attackers to cause denial of service or execute arbitrary code via crafted port parsing.
- 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-47751?
CVE-2024-47751 is a high-severity memory corruption vulnerability in Linux kernel, published on 21 Oct 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:
PCI: kirin: Fix buffer overflow in kirin_pcie_parse_port()
Within kirin_pcie_parse_port(), the pcie->num_slots is compared to pcie->gpio_id_reset size (MAX_PCI_SLOTS) which is correct and would lead to an overflow.
Thus, fix condition to pcie->num_slots + 1 >= MAX_PCI_SLOTS and move pcie->num_slots increment below the if-statement to avoid out-of-bounds array access.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
[kwilczynski: commit log]
Weakness: CWE-120
Which versions are affected by CVE-2024-47751?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-47751?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2024-47751 being exploited?
There is no known exploitation of CVE-2024-47751 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-50909, BELL-CVE-2024-47751, DEBIAN-CVE-2024-47751, GHSA-grr9-pcqm-fmr6, UBUNTU-CVE-2024-47751.