Skip to content

A bug that violates the specification of the length field #810

@jyjsunny

Description

@jyjsunny

Hi,
I found a bug that violates the specification that the length field should adhere to.

Steps to reproduce(after installation):

  1. Terminal 1 - Server
cd libmodbus/tests
./unit-test-server
  1. Terminal 2 - Client
    First, send one valid input:
    b'\x00\x01\x00\x00\x00\x06\xff\x01\x01\x30\x00\x06
    Second, send invalid inputs that contain incorrect length field values:
    b'\x00\x01\x00\x00\x00\x00\xff\x01\x01\x30\x00\x06
    b'\x00\x01\x00\x00\x10\x00\xff\x01\x01\x30\x00\x06
    3)Observe the server's outputs; we can see that they received the same positive response.
    b'\x00\x01\x00\x00\x00\x04\xff\x01\x01\x00
Image Image Image

The Modbus/TCP protocol specification that the bug violates is as follows:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions