Skip to content
Info disclosure Advisory Advanced CVE-2020-16990

Microsoft Azure Sphere kernel message ring buffer Information Disclosure Vulnerability

The Azure Sphere Linux kernel left the dmesg_restrict setting at zero, so any unprivileged user could read the kernel message ring buffer through the klogctl call. An attacker who already controls an application could read kernel logs that contain kernel code addresses, kernel memory addresses and userland register contents, which could help defeat ASLR or leak sensitive data.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

Medium 4.3 View original

An information disclosure vulnerability exists in the kernel message ring buffer functionality of Microsoft Azure Sphere 20.05. Unprivileged users can access the kernel message ring buffer, which can potentially leak sensitive information, such as kernel or userland memory addresses.

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 kernel configuration left dmesg_restrict at 0, so the kernel message ring buffer was readable by unprivileged users.

Impact

An attacker with a compromised application could read kernel and userland addresses and register contents, potentially stealing sensitive data or bypassing ASLR, though exhausting memory or creating resource pressure is needed first.

What the attacker needed

Code execution in an app on the device; ability to exhaust memory or spawn processes

The fix

The dmesg_restrict sysctl should be set to 1 so that only privileged users can read the kernel message ring buffer.

How it was found

  1. Run an application that repeatedly allocates memory until the out-of-memory killer terminates it, which writes a backtrace and register contents to the kernel log.
  2. Read the ring buffer from an unprivileged application using the klogctl call.
  3. To leak the init process address, spawn many child processes so resource pressure builds and the out-of-memory killer targets the application manager.
  4. Read the ring buffer again to obtain the application manager's register contents and its ASLR offset.

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.

The kernel keeps a log of messages, and on most systems only administrators may read it because it can contain memory addresses. On this device the setting that restricts that log was left open, so any program could read it. Addresses in the log help an attacker work around address randomisation, a defence that makes memory locations hard to predict.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

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.

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.