CVE-2026-143453: serial: sifive: fix off-by-one in console port bounds check
In the Linux kernel, the following vulnerability has been resolved:
serial: sifive: fix off-by-one in console port bounds check
sifiveserialconsoleports[] is sized SIFIVESERIALMAXPORTS (8), so valid indices are 0..7. The bounds check in sifiveserialprobe() uses "id > SIFIVESERIALMAXPORTS", which lets id == 8 pass and causes an out-of-bounds write in sspaddconsoleport() through sifiveserialconsoleports[ssp->port.line].
Fix the check to use >= instead, matching the check already used in sifiveserialconsolesetup().
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In Linux kernel sifive_serial_probe(), change the bounds check from `id > SIFIVE_SERIAL_MAX_PORTS` to `id >= SIFIVE_SERIAL_MAX_PORTS` so index 8 is rejected.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems running the Linux kernel with the SiFive serial driver are exposed when a console port is probed with port line ID 8. The affected console-port array supports only IDs 0 through 7.
What condition triggers the out-of-bounds write?
The issue occurs because the probe-time bounds check accepts an ID equal to SIFIVE_SERIAL_MAX_PORTS (8). That value is then used as an array index during console-port registration, writing beyond the eight-entry array.
How can I tell whether a system is affected by the triggering condition?
Check whether the SiFive serial driver is in use and whether a probed serial console port has line ID 8. IDs 0 through 7 are within the intended bounds; ID 8 is the invalid value that bypassed the flawed check.