Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] irqchip: validate ACPI MADT entries before use
@ 2026-10-16 14:13 Jiale Yao
  2026-10-16 14:13 ` [PATCH 2/6] irqchip/gic-v3-its: validate MADT ITS entries Jiale Yao
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jiale Yao @ 2026-10-16 14:13 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Marc Zyngier, Thomas Gleixner,
	Radu Rendec, Lorenzo Pieralisi, Huacai Chen, WANG Xuerui,
	Jiaxun Yang, linux-acpi, linux-kernel, linux-arm-kernel,
	loongarch, linux-mips
  Cc: Jiale Yao

IRQ chip ACPI probing receives MADT records supplied by firmware.  The
common probe path does not currently verify that the complete declared
entry is contained in the table, and several callbacks access
fixed-size records without checking their minimum size.  Malformed
entries can therefore cause out-of-bounds reads during early boot.

Add the common declared-range check first, then validate the concrete
ITS, GIC, LIO-PIC, and BIO-PIC records in their respective callbacks.
Each patch remains independently buildable and limits its changes to one
parser implementation.

Jiale Yao (6):
  ACPI: irqchip: validate MADT entry bounds before probing
  irqchip/gic-v3-its: validate MADT ITS entries
  irqchip/gic-v3: validate MADT records before use
  irqchip/gic-v5-its: validate MADT translate frames
  irqchip/loongarch-cpu: validate MADT LIO-PIC entries
  irqchip/loongson-eiointc: validate MADT BIO-PIC entries

 drivers/acpi/scan.c                    |  7 +++++++
 drivers/irqchip/irq-gic-v3-its.c       |  3 +++
 drivers/irqchip/irq-gic-v3.c           | 18 ++++++++++++++++++
 drivers/irqchip/irq-gic-v5-its.c       |  3 +++
 drivers/irqchip/irq-loongarch-cpu.c    |  3 +++
 drivers/irqchip/irq-loongson-eiointc.c | 10 ++++++++--
 6 files changed, 42 insertions(+), 2 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-16 14:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-16 14:13 [PATCH 0/6] irqchip: validate ACPI MADT entries before use Jiale Yao
2026-10-16 14:13 ` [PATCH 2/6] irqchip/gic-v3-its: validate MADT ITS entries Jiale Yao
2026-10-16 14:13 ` [PATCH 3/6] irqchip/gic-v3: validate MADT records before use Jiale Yao
2026-10-16 14:36   ` Marc Zyngier
2026-10-16 14:52     ` jiale yao
2026-10-16 14:13 ` [PATCH 4/6] irqchip/gic-v5-its: validate MADT translate frames Jiale Yao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox