Commit 229f733
committed
irqchip/gic-v3-its: Prevent double free on error
jira LE-1907
cve CVE-2024-35847
Rebuild_History Non-Buildable kernel-4.18.0-553.16.1.el8_10
commit-author Guanrui Huang <[email protected]>
commit c26591a
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 ]
Fixes: 7d75bbb ("irqchip/gic-v3-its: Add VPE irq domain allocation/teardown")
Signed-off-by: Guanrui Huang <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Marc Zyngier <[email protected]>
Reviewed-by: Zenghui Yu <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
(cherry picked from commit c26591a)
Signed-off-by: Jonathan Maple <[email protected]>1 parent 39bbb0b commit 229f733
1 file changed
+2
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4500 | 4500 | | |
4501 | 4501 | | |
4502 | 4502 | | |
4503 | | - | |
4504 | | - | |
4505 | | - | |
4506 | | - | |
4507 | | - | |
4508 | | - | |
4509 | | - | |
| 4503 | + | |
| 4504 | + | |
4510 | 4505 | | |
4511 | 4506 | | |
4512 | 4507 | | |
| |||
0 commit comments