Microsoft Azure Sphere /proc/fdt mmap operation out-of-bounds read vulnerability
The /proc/fdt mmap operation in Azure Sphere's Linux kernel lacks a size check, allowing a root user to map an arbitrarily large memory region and read out-of-bounds kernel memory. This can leak sensitive kernel data, potentially dumping the entire kernel memory.
Originally disclosed on Cisco Talos
An out-of-bounds read vulnerability exists in the /proc/fdt mmap operation functionality of Microsoft Azure Sphere 22.02. A specially-crafted mmap invocation can lead to a kernel memory leak.
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 simple_mmap function does not validate the requested mapping size against the actual size of the fdt memory region.
Impact
A root user could leak kernel memory, potentially dumping the entire kernel memory, bypassing Azure Sphere's additional security boundaries.
What the attacker needed
Root privileges on the device
How it was found
- Open the /proc/fdt file.
- Call mmap on the file descriptor with a large size.
- Read the mapped memory to obtain kernel 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.
A device driver for a special file in the Linux kernel lets programs map a file into memory. The code that handles this mapping does not check how much memory the program asks for, so a program can ask for more than the file actually has. This lets the program read memory beyond the file, which may contain sensitive kernel data.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.