<div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei"; line-height: 23.8px;"><span style="line-height: 23.8px;">I noticed that there is a potential bug in Unix-manager.c (suricata 3.0). Could you help to analyze it is a bug or not?</span></div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei"; line-height: 23.8px;"><br></div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei"; line-height: 23.8px;">1) in UnixNew,</div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei"; line-height: 23.8px;">          this->socket = socket(AF_UNIX, SOCK_STREAM, 0); // a STREAM type unix domain socket is created</div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei"; line-height: 23.8px;">2) in UnixCommandRun</div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei"; line-height: 23.8px;">       char buffer[4096];</div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei"; line-height: 23.8px;">       ret = recv(client->fd, buffer, sizeof(buffer) - 1, 0); // receive command from client</div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei"; line-height: 23.8px;">3)in UnixCommandExecute</div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei"; line-height: 23.8px;">      the \0 terminated buffer is checked to figure out the command.</div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei"; line-height: 23.8px;"><br></div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei"; line-height: 23.8px;">This socket is SOCK_STREAM type, no message boundary( just like TCP), the client may send 2 command by calling send twice,</div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei"; line-height: 23.8px;">but the server may get 2 command sticking together due to the "NO boundary problem" by just calling recv once.</div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei"; line-height: 23.8px;"><span style="line-height: 1.5;"><br></span></div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei"; line-height: 23.8px;"><span style="line-height: 1.5;">Maybe there should have more code to figure out the message boundary by checking the VERSION magic?</span></div>