Skip to content
Memory corruption Write-up Advanced

Compromising Garmin’s Sport Watches: A Deep Dive into GarminOS and its MonkeyC Virtual Machine

The researcher reverse-engineered Garmin watch firmware and found a dozen vulnerabilities in the MonkeyC virtual machine and its native functions, including buffer overflows, integer overflows, out-of-bound reads and writes, and permission bypasses. A malicious Connect IQ app installed on the watch could exploit these to break out of the virtual machine and gain native code execution, bypassing the permission model.

Tao Sauvage Follow

Published on anvilsecure.com

Check out my presentation at HITBSecConf2023 about it here.

Anvil Secure, on anvilsecure.com

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the native code implementing the virtual machine and its resource loaders and native functions failed to validate sizes, lengths and argument counts, leading to integer overflows, out-of-bound accesses and permission checks that could be bypassed.

Impact

A malicious Connect IQ app could bypass the permission model and gain native code execution on the watch, affecting over a hundred models, though the user must install the app first.

What the attacker needed

User installs a malicious CIQ app; app installed manually or from the store

The fix

The vulnerabilities were fixed in CIQ API version 3.1.x according to Garmin.

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 write-up has not been written yet. The Original tab links to the source.

A smartwatch runs small apps inside a sandbox, a restricted environment meant to stop an app from touching things it should not. The researcher took the watch's firmware apart and found mistakes in the code that runs those apps, so a malicious app could escape the sandbox and take control of the device. The user would have to install that app first, either from the official store or by sideloading it.

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.

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.