Microsoft Azure Sphere mount namespace unsigned code execution vulnerability
An unprivileged user could create a new user and mount namespace, mount a tmpfs filesystem, and execute an arbitrary binary from it, bypassing Azure Sphere's protection against unsigned code execution.
Originally disclosed on Cisco Talos
An unsigned code execution vulnerability exists in the mount namespace functionality of Microsoft Azure Sphere 21.01. A specially crafted shellcode could allow an adversary to execute an arbitrary binary in a tmpfs mount, leading to unsigned code execution.
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
Impact
An attacker with local access could execute unsigned code on the device, potentially compromising the integrity of the system.
What the attacker needed
Local access to the device; ability to run unprivileged code
How it was found
- Create a new user namespace and mount namespace using the unshare syscall with the appropriate flags.
- Mount a tmpfs filesystem at a chosen location, such as /tmp.
- Create a binary file with arbitrary contents inside the tmpfs mount.
- Execute the binary from the tmpfs mount.
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.
Azure Sphere is designed to only run code that is already on the device or has been signed and delivered by Microsoft. This report shows that a normal user could create a new isolated environment (a namespace) and mount a temporary filesystem there, then run any program from it. That breaks the rule that only trusted code can run.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.