Skip to content
Memory corruption Advisory Advanced CVE-2019-5094

E2fsprogs quotaio_tree.c report_tree() code execution vulnerability

A specially crafted ext4 partition can cause an out-of-bounds write on the heap in e2fsprogs' quota file handling, leading to code execution. An attacker can corrupt a partition to trigger this vulnerability.

Lilith >_> Follow

Originally disclosed on Cisco Talos

High 7.5 View original

An exploitable code execution vulnerability exists in the quota file functionality of E2fsprogs 1.45.3. A specially crafted ext4 partition can cause an out-of-bounds write on the heap, 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

The code uses a block number read from disk as an index into a heap bitmap without checking that the index is within the bitmap's bounds, causing out-of-bounds read and write.

Impact

An attacker could achieve code execution by corrupting a partition, though the CVSS vector indicates local access with high complexity and privileges required.

What the attacker needed

A specially crafted ext4 partition; local access to mount or process the partition

How it was found

  1. Create a specially crafted ext4 partition with a corrupted quota inode.
  2. Mount or process the partition with e2fsprogs, causing it to read the quota inode.
  3. The quota block number from disk is used as an index into the bitmap, causing an out-of-bounds read.
  4. If the bit is not set, the code enters report_block and performs an out-of-bounds write.

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 is a bug in software that manages disk quotas on Linux filesystems. A maliciously crafted disk partition can trick the software into writing outside the memory it reserved, which can let an attacker run their own code. The attacker needs to provide a corrupted partition, for example on a USB drive or disk image.

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

1 more disclosed report, 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.