Skip to content
Info disclosure Advisory Intermediate CVE-2020-6107

F2fs-Tools F2fs.Fsck dev_read Information Disclosure Vulnerability

The f2fs.fsck tool reads disk blocks into a buffer but only checks if the read system call returns a negative value, not if it returns zero (end of file). An attacker can craft a malicious f2fs filesystem image that causes the tool to read past the end of a device file, leaving the buffer uninitialized and potentially disclosing heap memory contents.

Lilith >_> Follow

Originally disclosed on Cisco Talos

Medium 4.4 View original

An exploitable information disclosure vulnerability exists in the devread functionality of F2fs-Tools F2fs.Fsck 1.13. A specially crafted f2fs filesystem can cause an uninitialized read resulting in an information disclosure.

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 dev_read function only checks if read() returns a negative value, but not if it returns zero (EOF), so the buffer remains uninitialized when reading past the end of a device file.

Impact

An attacker could disclose uninitialized heap memory contents, potentially leaking sensitive information.

What the attacker needed

Attacker provides a malicious f2fs filesystem image; victim runs fsck.f2fs on the image

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.

When a program reads data from a file, it must check how many bytes were actually read. If the file is shorter than expected, the read may return zero, meaning nothing was read. This program only checks for an error (negative return), so it ignores the zero case and uses whatever was already in memory, which could contain sensitive data from other parts of the program.

What is Info disclosure?

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

More by Lilith >_>

View all

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