Vulnerability Description
The LINUXTCP port of FreeModbus contains an off-by-one bounds check in xMBPortTCPPool() (demo/LINUXTCP/port/porttcp.c). The check `if (usTCPFrameBytesLeft > MB_TCP_BUF_SIZE)` uses a strict greater-than comparison instead of greater-than-or-equal against the 263-byte MB_TCP_BUF_SIZE 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.
CVSS Score
CRITICAL
Related Weaknesses (CWE)
References
- https://github.com/cwalter-at/freemodbus
- https://github.com/cwalter-at/freemodbus/blob/master/demo/LINUXTCP/port/porttcp.
FAQ
What is CVE-2026-71263?
CVE-2026-71263 is a vulnerability with a CVSS score of 9.1 (CRITICAL). The LINUXTCP port of FreeModbus contains an off-by-one bounds check in xMBPortTCPPool() (demo/LINUXTCP/port/porttcp.c). The check `if (usTCPFrameBytesLeft > MB_TCP_BUF_SIZE)` uses a strict greater-tha...
How severe is CVE-2026-71263?
CVE-2026-71263 has been rated CRITICAL with a CVSS base score of 9.1/10. This is considered a critical vulnerability requiring immediate attention.
Is there a patch for CVE-2026-71263?
Check the references section above for vendor advisories and patch information. Review vendor security bulletins for remediation guidance.