CVE-2026-71263: FreeModbus LINUXTCP Port Off-by-One Global Buffer Overflow in xMBPortTCPPool()
The LINUXTCP port of FreeModbus contains an off-by-one bounds check in xMBPortTCPPool() (demo/LINUXTCP/port/porttcp.c). The check if (usTCPFrameBytesLeft > MBTCPBUFSIZE) uses a strict greater-than comparison instead of greater-than-or-equal against the 263-byte MBTCPBUFSIZE limit. An MBAP frame with a Length field of 264 makes usTCPFrameBytesLeft equal to 263, which passes the flawed check, and the subsequent recv() call writes up to 263 bytes starting at buffer offset 7 into the 263-byte static buffer aucTCPBuf, overflowing it by 7 bytes into the adjacent static variable usTCPBufPos. A single crafted, unauthenticated Modbus TCP packet triggers the overflow, since Modbus has no built-in authentication.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-71263?
The severity of CVE-2026-71263 is classified as critical with a score of 9.1.
How do I fix CVE-2026-71263?
To fix CVE-2026-71263, update to the latest version of FreeModbus that addresses the off-by-one buffer overflow in the xMBPortTCPPool() function.
What is the impact of CVE-2026-71263?
CVE-2026-71263 allows for a global buffer overflow, which can lead to unauthorized access and potential system compromise.
Is CVE-2026-71263 exploitable remotely?
Yes, CVE-2026-71263 is exploitable remotely due to its exposure through the LINUXTCP port.
What software is affected by CVE-2026-71263?
CVE-2026-71263 affects the FreeModbus LINUXTCP Port software.