Re: [PATCH] serial: sifive: fix off-by-one in console port bounds check
From: patchwork-bot+linux-riscv
Date: Sun Nov 01 2026 - 17:22:23 EST
Hello:
This patch was applied to riscv/linux.git (fixes)
by Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>:
On Thu, 27 Aug 2026 09:45:24 +0800 you wrote:
> From: Zongmin Zhou <zhouzongmin@xxxxxxxxxx>
>
> sifive_serial_console_ports[] is sized SIFIVE_SERIAL_MAX_PORTS (8), so
> valid indices are 0..7. The bounds check in sifive_serial_probe() uses
> "id > SIFIVE_SERIAL_MAX_PORTS", which lets id == 8 pass and causes an
> out-of-bounds write in __ssp_add_console_port() through
> sifive_serial_console_ports[ssp->port.line].
>
> [...]
Here is the summary with links:
- serial: sifive: fix off-by-one in console port bounds check
https://git.kernel.org/riscv/c/bf961847813d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html