MZ Automation GmbH libiec61850 parseNormalModeParameters denial of service vulnerability
A denial of service vulnerability exists in the parseNormalModeParameters function of libiec61850 1.5.0. An attacker can send specially crafted IEC61850 messages to cause an infinite loop, exhausting available connections and preventing legitimate clients from connecting.
Originally disclosed on Cisco Talos
A denial of service vulnerability exists in the parseNormalModeParameters functionality of MZ Automation GmbH libiec61850 1.5.0. A specially-crafted series of network requests can lead to denial of service.
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 function parseNormalModeParameters does not check the return value of parsePresentationContextDefinitionList, which can return -1 on error, leaving bufPos as -1 and causing an infinite loop.
Impact
An attacker could cause a denial of service by exhausting all available client connections, preventing legitimate communications.
What the attacker needed
Network access to the server; ability to send crafted IEC61850 messages
The fix
The presentation-context-definition list case should check for a negative bufPos and return -1, similar to how the user data parameter checks bufPos.
How it was found
- Craft an IEC61850 message with a presentation-context-definition list such that the length and buffer position sum to the end position, causing BerDecoder_decodeLengthRecursive to return -1.
- Send the crafted message to the server.
- Repeat sending the message at least CONFIG_MAXIMUM_TCP_CLIENT_CONNECTIONS times to exhaust all connection slots.
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 is a bug in a library that handles a specific industrial network protocol. When the library receives a malformed message, it gets stuck in an endless loop and never finishes processing that connection. If an attacker sends enough of these messages, all available connection slots are taken up, so normal users cannot connect.
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.