REDHAT-BUG-2583439: High severity Erlang Erlang/OTP vulnerability
Improper Validation of Specified Quantity in Input vulnerability in the BER decoder in Erlang/OTP snmp allows an unauthenticated remote attacker to exhaust CPU via an SNMP message that contains an OBJECT IDENTIFIER with a very long sub-identifier.
snmppdus:decoidelement/3 does not limit the number of base-128 octets in a sub-identifier, and snmppdus:decoidelements/3 does not limit the number of sub-identifiers, so one sub-identifier can span the whole datagram. When the value exceeds the native integer size, each further octet copies a growing bignum, and decoding time grows quadratically with the sub-identifier length. The agent and the manager decode OIDs before they check community strings or SNMPv3 credentials, inside the single network interface process (snmpanetif or snmpmnetif). That process does not read the next datagram until decoding completes.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.20, OTP 28.5.0.9, and OTP 29.1.3, corresponding to snmp from 4.25.1 before 5.18.2.3, 5.20.2.4, and 5.20.7. Whether OTP before OTP 17.0, corresponding to snmp before 4.25.1, is affected is unknown.
Affected Software
Event History
Frequently Asked Questions
Which SNMP deployments are exposed to unauthenticated attack?
Both Erlang/OTP SNMP agents and managers are exposed if they process network SNMP messages using affected versions. Authentication does not prevent exploitation because OIDs are decoded before community strings or SNMPv3 credentials are checked.
What does an attacker need to send?
An attacker needs to send an SNMP datagram containing an OBJECT IDENTIFIER with an excessively long sub-identifier encoded in base-128 octets. A single sub-identifier can span the entire datagram, causing quadratic CPU consumption during decoding.
What is the operational impact while a malicious datagram is decoded?
The SNMP network interface process performs decoding and does not read the next datagram until decoding finishes. This can delay processing of subsequent SNMP traffic while CPU is exhausted.
Which versions are known to be affected?
Known affected releases are OTP 17.0 through versions before OTP 27.3.4.20, OTP 28.5.0.9, and OTP 29.1.3. The corresponding affected SNMP range is 4.25.1 through versions before 5.18.2.3, 5.20.2.4, and 5.20.7; impact on earlier releases is unknown.