Skip to content
Memory corruption Advisory Advanced CVE-2018-3972

Epee Levin Packet Deserialization Code Execution Vulnerability

A logic flaw in the Levin deserialization of the epee library allows a specially crafted network packet to cause a memcpy into a boost::recursive_variant object, leading to a crash and potentially code execution. An attacker can send a packet to trigger this vulnerability.

Lilith Follow

Originally disclosed on Cisco Talos

Critical 10.0 View original

An exploitable code execution vulnerability exists in the Levin deserialization functionality of the epee library. A specially crafted network packet can cause a logic flaw, resulting in code execution.

Lilith (>_>), 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 deserialization code treats a boost::recursive_variant object as a plain-old-data type and performs a raw memcpy into it, corrupting internal pointers.

Impact

An attacker could potentially execute arbitrary code on a Monero node by sending a crafted packet, though the report only demonstrates a crash.

What the attacker needed

Network access to a Monero node

The fix

The vendor released a patch, but the report does not describe the fix details.

How it was found

  1. Craft a Levin packet with a section entry of type array containing an array_entry object.
  2. Send the packet to a Monero node using the Levin protocol.
  3. The deserialization code reads the array_entry and performs a memcpy into a boost::recursive_variant object.
  4. This causes a crash (SIGSEGV) and may allow control of execution flow.

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 bug in how a cryptocurrency network library (epee) reads data from the network. When it reads a certain type of data, it mistakenly copies bytes directly into a complex C++ object, which can crash the program or let an attacker run their own code. The attacker only needs to send a specially crafted network packet.

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 Lilith

View all

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