irqchip/gic-v3-its: Avoid truncating memory addresses
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ cc2d3216f53c9fff0030eb71cacc4ce5f39d1d7e · < 03faa61eb4b9ca9aa09bd91d4c3773d8e7b1ac98| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
irqchip/gic-v3-its: Avoid truncating memory addresses
On 32-bit machines with CONFIG_ARM_LPAE, it is possible for lowmem allocations to be backed by addresses physical memory above the 32-bit address limit, as found while experimenting with larger VMSPLIT configurations.
This caused the qemu virt model to crash in the GICv3 driver, which allocates the 'itt' object using GFP_KERNEL. Since all memory below the 4GB physical address limit is in ZONE_DMA in this configuration, kmalloc() defaults to higher addresses for ZONE_NORMAL, and the ITS driver stores the physical address in a 32-bit 'unsigned long' variable.
Change the itt_addr variable to the correct phys_addr_t type instead, along with all other variables in this driver that hold a physical address.
The gicv5 driver correctly uses u64 variables, while all other irqchip drivers don't call virt_to_phys or similar interfaces. It's expected that other device drivers have similar issues, but fixing this one is sufficient for booting a virtio based guest.
From the CVE record · Linux
On 32-bit systems with CONFIG_ARM_LPAE, the GICv3 ITS driver can truncate physical memory addresses above the 32-bit limit. This caused a QEMU virt guest to crash; the input does not describe an attacker path, authentication requirement, or user interaction.
Engineers running the Linux kernel on 32-bit systems with CONFIG_ARM_LPAE should check their affected versions against the vendor advisory; no version range is provided.