irqchip/gic-v3-its: Prevent double free on error
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7d75bbb4bc1ad90386776459d37e4ddfe605671e · < 03170e657f62c26834172742492a8cb8077ef792| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
irqchip/gic-v3-its: Prevent double free on error
The error handling path in its_vpe_irq_domain_alloc() causes a double free when its_vpe_init() fails after successfully allocating at least one interrupt. This happens because its_vpe_irq_domain_free() frees the interrupts along with the area bitmap and the vprop_page and its_vpe_irq_domain_alloc() subsequently frees the area bitmap and the vprop_page again.
Fix this by unconditionally invoking its_vpe_irq_domain_free() which handles all cases correctly and by removing the bitmap/vprop_page freeing from its_vpe_irq_domain_alloc().
[ tglx: Massaged change log ]
From the CVE record · Linux
The Linux kernel's irqchip/gic-v3-its code can double-free memory when its_vpe_init() fails after allocating at least one interrupt. The input does not establish whether an attacker can trigger this condition, or specify network or local access, authentication, or user interaction requirements.
Engineers running Linux kernels with irqchip/gic-v3-its should check their versions; affected versions are not specified.