]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/gpio: npcm7xx: fixup out-of-bounds access
authorPatrick Venture <venture@google.com>
Fri, 7 Mar 2025 10:08:19 +0000 (10:08 +0000)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 22 Mar 2025 07:52:25 +0000 (10:52 +0300)
commit4ffa569f32d95f96e0d4d9de4a6b1600b9da064d
treebf8d4b42279d41c14506ab9a3a1131df460f9bc4
parentc76d03dd928850bd18fcb5721125fbdee86a76cd
hw/gpio: npcm7xx: fixup out-of-bounds access

The reg isn't validated to be a possible register before
it's dereferenced for one case.  The mmio space registered
for the gpio device is 4KiB but there aren't that many
registers in the struct.

Cc: qemu-stable@nongnu.org
Fixes: 526dbbe0874 ("hw/gpio: Add GPIO model for Nuvoton NPCM7xx")
Signed-off-by: Patrick Venture <venture@google.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20250226024603.493148-1-venture@google.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 3b2e22c0bbe2ce07123d93961d52f17644562cd7)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/gpio/npcm7xx_gpio.c