Skip to content
Info disclosure Advisory Advanced CVE-2020-6058

Mini-SNMPD decode_cnt information leak vulnerability

Mini-SNMPD 1.4's decode_cnt function checks packet bounds using a size_t comparison that can wrap around when the declared integer length exceeds the packet size, so a crafted SNMP request makes the parser read past the end of the heap buffer. An attacker could disclose small amounts of adjacent memory four bytes at a time and, by reading far enough out of bounds, crash the server for denial of service.

Aleksandar Nikolic Follow

Originally disclosed on Cisco Talos

High 8.2 View original

An exploitable out-of-bounds read vulnerability exists in the way MiniSNMPD version 1.4 parses incoming SNMP packets. A specially crafted SNMP request can trigger an out-of-bounds memory read, which can result in the disclosure of sensitive information and denial of service.

Aleksandar Nikolic, 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 the bounds check subtracts the attacker-controlled length from the packet size in unsigned arithmetic, so a length larger than the packet wraps around and the check passes.

Impact

An attacker could read limited amounts of out-of-bounds memory and could crash the server by forcing reads into unallocated memory, causing denial of service.

What the attacker needed

Network access to the SNMP service; no authentication needed

The fix

The bounds check should be rewritten so an oversized length cannot wrap around, for example by rejecting any length greater than the remaining packet size before the subtraction.

How it was found

  1. Craft an SNMP packet whose non-repeaters or max repetitions integer field declares a length larger than the whole packet.
  2. Send the packet to the Mini-SNMPD server so decode_cnt is called with that oversized length.
  3. Observe the out-of-bounds read, which under Address Sanitizer reports a heap-buffer-overflow.
  4. Repeat with varying packet sizes to read further memory or to reach unallocated memory and crash the service.

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.

SNMP is a protocol used to monitor and manage devices such as routers. Each value in a packet carries a length, and the server trusts that length when deciding how many bytes to read. Here the length check can be fooled by a very large number, so the server keeps reading past the end of the received data, leaking nearby memory or crashing.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Aleksandar Nikolic

View all

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

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.