Skip to content

OVS packetIn message is possibly overflowed when processing a large packet #371

@wenyingd

Description

@wenyingd

OVS team,

We recently hit a failure with OVS when parsing the packetIn message which has delivered a large UDP packet.

According to the OpenFlow spec, the max length of an openflow message (e.g., packetIn2, https://github.com/openvswitch/ovs/blob/main/include/openflow/nicira-ext.h#L275) is 64 KB, and OVS uses uint16 as the type of length field in ofp_header. For a PacketIn message especially for PacketIn2, the content of a message includes the packet bytes and other fields like the matches, actions, notes, etc. So if the packet itself is large, e.g., 64KB, the total length of the OpenFlow message is overflowed.
From the existing OVS behavior, the message is sent to the connection to the OF controller. It may cause issues when the OF controller tries to decode the message because the length parsed in the message header is not equal to the size of the bytes received in the connection.

Steps to reproduce the issue:

  1. Install OpenFlow entry to packetIn UDP packets to controller
  2. Run OF controller locally and use a Unix Domain Socket between the OF controller and OVS
  3. Generate a large UDP and send into OVS bridge to enforce it be matched by the OpenFlow entry added in step 1, e.g., generate the UDP packet with 65400 bytes.
  4. Parse the packetIn message in OF controller.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions