Skip to content
Memory corruption Advisory Advanced CVE-2021-41376

Microsoft Azure Sphere Security Monitor SMSyscallStageBaseManifests offset calculation out-of-bounds read vulnerability

An out-of-bounds read vulnerability exists in the SMSyscallStageBaseManifests offset calculation of Microsoft Azure Sphere 21.01. A specially crafted manifest could lead to information disclosure.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

An out-of-bounds read vulnerability exists in the Security Monitor SMSyscallStageBaseManifests offset calculation of Microsoft Azure Sphere 21.01. A specially crafted manifest could lead to information disclosure.

Claudio Bozzato and 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 offset parameter is added to the buffer pointer without validating that the resulting pointer stays within the bounds of the provided buffer.

Impact

This issue might be exploited to provide an information leak, using the function outputs as an oracle; the authors note they have not implemented the full attack and that further checks may limit exploitation.

What the attacker needed

Elevated privileges or AZURE_SPHERE_CAP_UPDATE_IMAGE…; ability to run a real-time app on an M4 core; ability to execute syscalls from Linux side

The fix

The vulnerability was fixed by the vendor on 2021-11-09.

How it was found

  1. Find the manifest input buffer by using SMSyscallStageBaseManifests with incrementing or decrementing offsets until the device crashes, then calculate where the manifest is stored.
  2. Allocate a DMA buffer and use an offset such that the manifest lands in the allocated DMA buffer.
  3. Load a real-time app and share the DMA buffer containing the manifest with the Linux side.
  4. Exploit the TOCTTOU: simultaneously execute a SMSyscallStageBaseManifests call from the Linux side and instruct the real-time app to continuously write header_size and/or entry_size in the manifest header, switching between valid and…

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 a platform for internet-of-things devices. A part of it called the Security Monitor handles system calls from applications. The bug is that one system call adds an offset to a memory pointer without checking if the result stays inside the allowed memory, so an attacker with special privileges could read memory outside the intended buffer and leak information.

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 Claudio Bozzato

View all

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

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.