Microsoft Azure Sphere Littlefs truncate information disclosure vulnerability
A truncate operation on a file in the littlefs filesystem can cause a read to return uninitialized memory from a cached page, leaking data from other processes. An attacker with local access can use syscalls to trigger this information disclosure.
An information disclosure vulnerability exists in the Littlefs filesystem functionality of Microsoft Azure Sphere 20.06. A specially crafted set of syscalls can cause an uninitialized read, resulting leakage of information.
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 a page in the page cache is marked as up-to-date but contains uninitialized data, and the read path copies it to userspace without zeroing the extended portion.
Impact
An attacker could read uninitialized memory that may contain information from other processes, leading to information disclosure.
What the attacker needed
Local access to the device; ability to execute syscalls; mutable storage enabled
How it was found
- Open a file with create and read-write flags.
- Write a few bytes to the file.
- Close the file.
- Truncate the file to a larger size.
- Read the file to observe leaked 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.
When a file is made larger with the truncate command, the new space should be filled with zeros. Instead, the system sometimes returns old data that was left in memory, which could belong to other programs. This means someone with access to the device could read information they should not see.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.