CVE-2024-49927 x86/ioapic: Handle allocation failures gracefully
A local attacker can trigger a kernel panic via memory allocation failures in the IO-APIC driver, causing a denial of service.
- 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-49927?
CVE-2024-49927 is a medium-severity denial of service 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:
x86/ioapic: Handle allocation failures gracefully
Breno observed panics when using failslab under certain conditions during runtime:
can not alloc irq_pin_list (-1,0,20) Kernel panic - not syncing: IO-APIC: failed to add irq-pin. Can not proceed
panic+0x4e9/0x590 mp_irqdomain_alloc+0x9ab/0xa80 irq_domain_alloc_irqs_locked+0x25d/0x8d0 __irq_domain_alloc_irqs+0x80/0x110 mp_map_pin_to_irq+0x645/0x890 acpi_register_gsi_ioapic+0xe6/0x150 hpet_open+0x313/0x480
That's a pointless panic which is a leftover of the historic IO/APIC code which panic'ed during early boot when the interrupt allocation failed.
The only place which might justify panic is the PIT/HPET timer_check() code which tries to figure out whether the timer interrupt is delivered through the IO/APIC. But that code does not require to handle interrupt allocation failures. If the interrupt cannot be allocated then timer delivery fails and it either panics due to that or falls back to legacy mode.
Cure this by removing the panic wrapper around __add_pin_to_irq_node() and making mp_irqdomain_alloc() aware of the failure condition and handle it as any other failure in this function gracefully.
Which versions are affected by CVE-2024-49927?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-49927?
Apply the vendor's patch.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2024-49927 being exploited?
There is no known exploitation of CVE-2024-49927 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-52944, BELL-CVE-2024-49927, DEBIAN-CVE-2024-49927, GHSA-8r8w-7pvp-9gqf, ROOT-OS-DEBIAN-11-CVE-2024-49927, UBUNTU-CVE-2024-49927.