QEMU: aarch64: :GIC: out-of-bounds access via interrupt ID Via [qemu-security] list +-- On Sun, 31 Jan 2021, Philippe Mathieu-Daudé wrote --+ | On 1/31/21 11:34 AM, Philippe Mathieu-Daudé wrote: | > Per the ARM Generic Interrupt Controller Architecture specification | > (document "ARM IHI 0048B.b (ID072613)"), the SGIINTID field is 4 bit, | > not 10: | > | > - Table 4-21 GICD_SGIR bit assignments | > | > The Interrupt ID of the SGI to forward to the specified CPU | > interfaces. The value of this field is the Interrupt ID, in | > the range 0-15, for example a value of 0b0011 specifies | > Interrupt ID 3. | > ... | > Correct the irq mask to fix an undefined behavior (which eventually | > lead to a heap-buffer-overflow, see [Buglink]): | > | > $ echo 'writel 0x8000f00 0xff4affb0' | qemu-system-aarch64 -M virt,accel=qtest -qtest stdio | > [I 1612088147.116987] OPENED | > [R +0.278293] writel 0x8000f00 0xff4affb0 | > ../hw/intc/arm_gic.c:1498:13: runtime error: index 944 out of bounds for type 'uint8_t [16][8]' | > SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../hw/intc/arm_gic.c:1498:13 | > | > Cc: