Skip to content
Info disclosure Advisory Advanced

Microsoft Azure Sphere Kernel GPIO_GET_PIN_ACCESS_CONTROL_USER information disclosure vulnerability

A signedness bug in the Azure Sphere kernel's GPIO access-control ioctl allows a privileged attacker to bypass a bounds check and read arbitrary kernel memory. An attacker with CAP_SYS_ADMIN can leak kernel memory via a crafted ioctl call.

Lilith >_> Follow

Originally disclosed on Cisco Talos

Medium 4.4 View original

An information disclosure vulnerability exists in the GPIOGETPINACCESSCONTROLUSER functionality of Microsoft Azure Sphere 21.06. A specially crafted ioctl can lead to a kernel memory leak.

Lilith >_> and Claudio Bozzato, 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

Likely a signed integer comparison: a 32-bit signed offset is compared against a 16-bit unsigned pin count, allowing negative offsets to bypass the bounds check and cause an out-of-bounds read.

Impact

An attacker with CAP_SYS_ADMIN could leak arbitrary kernel memory, potentially disclosing sensitive information.

What the attacker needed

CAP_SYS_ADMIN privileges

The fix

The vulnerability was fixed by the vendor.

How it was found

  1. Obtain CAP_SYS_ADMIN privileges on the Azure Sphere device.
  2. Craft an ioctl call to GPIO_GET_PIN_ACCESS_CONTROL_USER with a lineoffsets array containing a negative offset (e.g., greater than 0x7FFFFFFF).
  3. The kernel bypasses the bounds check due to signed comparison and reads from an out-of-bounds address.
  4. The leaked data is copied back to userland in the uid array.

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.

This is a bug in a small operating system used on Azure Sphere IoT devices. A program with special privileges can ask the system for information about GPIO pins, but due to a mistake in how a number is checked, it can trick the system into reading memory it should not access. This lets an attacker see secret data stored in the kernel.

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

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