Skip to content
Memory corruption Disclosed report Advanced CVE-2014-4611

LZ4 Core

An integer overflow in the LZ4 decompression routine lets an attacker control the offset of a write pointer, so a small write can land at a chosen memory location. The report claims this can cause denial of service and out-of-bounds writes, and may allow code execution, though that was not tested.

donb Follow

Originally disclosed on HackerOne

  • Fixed in 29 days
  • Paid in 29 days
  • Disclosed after 29 days

#############################################################################

Lab Mouse Security Report

LMS-2014-06-16-6

Report ID: LMS-2014-06-16-6 CVE ID: CVE-2014-4611

Researcher Name: Don A. Bailey Researcher Organization: Lab Mouse Security Researcher Email: donb at securitymouse.com Researcher Website: www.securitymouse.com

Vulnerability Status: Reported / No response Vulnerability Embargo: Broken

Vulnerability Class: Integer Overflow Vulnerability Effect: Memory Corruption Vulnerability Impact: DoS, OOW, RCE Vulnerability DoS Practicality: Practical Vulnerability OOW Practicality: Practical Vulnerability RCE Practicality: Untested Vulnerability Criticality: High

Vulnerability Scope: All versions of the LZ4 software: https://code.google.com/p/lz4

Functions Affected: lz4.c:LZ4_decompress_generic

Criticality Reasoning

Due to the design of the algorithm, an attacker can specify any desired offset to a write pointer. The attacker can instrument the write in such a way as to only write four bytes at a specified offset. Subsequent code will allow the attacker to escape from the decompression algorithm without further memory corruption. This may allow the attacker to overwrite critical structures in memory that affect flow of execution. White DoS and OOW are obvious side effects of this flaw, RCE with respect to this flaw is untested.

Vulnerability Description

An integer overflow can occur when processing any variant of a "literal run" in the affected function.

Vulnerability Resolution

Pending.

The original report as published on HackerOne, by donb. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 an integer overflow in the literal-run length handling of the decompression function, which is not validated before it is used to move the write pointer.

Impact

An attacker could cause a denial of service or an out-of-bounds write, and may be able to overwrite critical memory structures to affect execution flow; remote code execution was not tested.

What the attacker needed

Attacker supplies crafted LZ4 data

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.

LZ4 is a compression library that unpacks data. When it unpacks a specially crafted block, a size calculation can wrap around, and the program then writes a few bytes to a place in memory it should not touch. That can crash the program or, in theory, let an attacker change how it runs.

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 donb

View all

1 more disclosed report, best first.

More from Internet Bug Bounty

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.