Skip to content
DoS Advisory Intermediate CVE-2024-36981CVE-2024-36980

OpenPLC OpenPLC_v3 OpenPLC Runtime EtherNet/IP PCCC out-of-bounds read vulnerability

An out-of-bounds read vulnerability exists in the OpenPLC Runtime EtherNet/IP PCCC parser because an error return value of -1 is compared against an unsigned 16-bit integer, causing the check to fail and a large size value to be used in a memmove. An attacker can send a specially crafted network request to trigger a denial of service.

Jared Rittle Follow

Originally disclosed on Cisco Talos

High 7.5 View original

An out-of-bounds read vulnerability exists in the OpenPLC Runtime EtherNet/IP PCCC parser functionality of OpenPLCv3 b4702061dc14d1024856f71b4543298d77007b88. A specially crafted network request can lead to denial of service.

Jared Rittle, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a type mismatch: a function returns -1 to indicate an error, but the caller stores it in an unsigned 16-bit integer and compares it to -1 without casting, so the check always fails and the error value is treated as a large positive size.

Impact

An attacker can send a series of EtherNet/IP requests to crash the OpenPLC runtime, causing a denial of service.

What the attacker needed

Network access to the OpenPLC runtime

The fix

The issue was fixed by updating OpenPLC to a patched version; alternatively, the source code should cast -1 to a matching type in the affected comparison.

How it was found

  1. Send a PCCC request with an unsupported command/function pair to the OpenPLC runtime.
  2. The runtime returns -1 as the PCCC length, which is stored as 0xFFFF and bypasses the error check.
  3. The large size is used in a memmove call, causing an out-of-bounds read and a crash.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This report describes a bug in an industrial control program called OpenPLC. When the program receives a certain type of network message, it tries to copy more data than it should, reading past the end of a memory buffer. This causes the program to crash, which is a denial of service.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by Jared Rittle

View all

64 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.