Skip to content
Memory corruption Advisory Advanced CVE-2019-5105

3S-Smart Software Solutions CODESYS GatewayService memory corruption vulnerability

A memory corruption vulnerability in CODESYS GatewayService allows an attacker to send a specially crafted packet that causes an integer underflow, leading to a large memcpy and an access violation, terminating the process. This can be triggered remotely or locally, resulting in a denial of service.

Carl Hurd Follow

Originally disclosed on Cisco Talos

High 7.5 View original

An exploitable memory corruption vulnerability exists in the Name Service Client functionality of 3S-Smart Software Solutions CODESYS GatewayService. A specially crafted packet can cause a large memcpy, resulting in an access violation and termination of the process.

Carl Hurd, 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

The program calculates a size value from packet fields without checking if they are within bounds, leading to an integer underflow that is used as the size in a memcpy operation.

Impact

An attacker could remotely cause a denial of service by crashing the GatewayService process.

What the attacker needed

Network access to the service

The fix

The vendor patched the vulnerability in version 3.5.16.10.

How it was found

  1. Connect to the target host and port.
  2. Send a specially crafted packet to the service.
  3. The service crashes due to an access violation.

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 flaw in industrial control software that lets an attacker crash a service by sending a malformed network message. The message tricks the program into copying too much data, which crashes it. The attacker can do this remotely, causing the service to stop working.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Carl Hurd

View all

49 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.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.