Skip to content
Memory corruption Advisory Advanced CVE-2020-6059

Mini-SNMPD decode_int Information Leak Vulnerability

Mini-SNMPD's decode_int function has an integer overflow in its bounds check, allowing a crafted SNMP packet with a large length field to read out-of-bounds memory. An attacker could disclose sensitive memory contents or cause a denial of service by crashing the server.

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 sensitive information disclosure 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

The bounds check `*pos >= (size - len + 1)` can wrap around when `len` is larger than `size`, allowing the loop to read beyond the packet buffer.

Impact

An attacker could read arbitrary amounts of memory four bytes at a time, potentially disclosing sensitive information, and could cause a denial of service by triggering an access violation and crash.

What the attacker needed

Network access to the SNMP server

The fix

The bounds check should be corrected to prevent integer wraparound, for example by checking `len > size - *pos` instead.

How it was found

  1. Send an SNMP packet with a request ID field whose length is larger than the packet size.
  2. The decode_int function uses this length without proper validation, reading past the buffer.

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.

The SNMP server reads a length value from the incoming packet and uses it to decide how many bytes to read. Because of a maths mistake, a very large length value slips past the safety check, so the server reads past the end of the packet buffer. This can leak memory contents or crash the server.

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

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.