GhostMap vulnerability lets a malicious APK brick Android phones in a crash loop

Illustrative photo: GhostMap lets a malicious APK trap Android devices in endless crash loops.

Bitdefender researchers disclosed a new Android flaw named GhostMap that can force a device into an endless crash loop simply by installing a specially crafted APK, potentially rendering the phone unusable without a factory reset.

What is GhostMap?

GhostMap is a malformed ZIP entry inside an APK that triggers repeated crashes of Android’s core system_server process. The issue surfaced when a banking‑related sample repeatedly crashed emulators, prompting a deeper investigation of the operating system’s ZIP handling.

Both Bitdefender’s public report and its technical blog explain that the bug stems from Android’s incorrect handling of two ZIP‑header fields – the compression method and the declared uncompressed length – which can cause a SIGBUS fault when the system attempts to read the entry.

How the exploit works

When the malicious APK is installed, the package installer parses the APK’s ZIP structure. A malformed entry claims an uncompressed size far larger than the actual data, and the libziparchive library fails to validate this for compressed entries, leading to an out‑of‑bounds memory map.

The system_server process, which loads many system components, reads the corrupt entry, crashes, is automatically restarted by init, reads the same APK again, and crashes once more. This creates a perpetual crash‑restart cycle that blocks the UI from ever appearing.

Because the APK contains no executable code and requires no permissions, merely installing the file is enough to trigger the denial‑of‑service condition.

Recovery options and limitations

Bitdefender notes that the only reliable way to break the loop is a factory reset, which erases user data. If USB debugging was already enabled, a computer with ADB can delete the malicious file before the system restarts, but this requires the device to stay alive long enough to accept the command.

The process to recover an Android phone trapped in the GhostMap crash loop consists of two steps: performing a factory reset or using ADB via USB debugging if already enabled.

An Android Authority article confirms that safe mode does not bypass the crash, and the loop persists across reboots until the offending APK is removed or the device is reflashed.

Impact on Android security and Google’s response

The disclosure highlights a perennial challenge for Android: the OS parses APKs at many stages – installation, signature verification, resource loading, and runtime – using independent code paths that lack strict sanity checks. A single inconsistency, as demonstrated by GhostMap, can cascade into a system‑wide denial of service without any malicious payload. For users, the practical risk is data loss from forced factory resets; for attackers, the technique could be used for extortion or to disrupt device‑by‑device analysis pipelines. Google’s decision not to issue a fix, labeling the bug outside the scope of a security update, underscores the difficulty of patching low‑level parser logic without breaking compatibility across a fragmented ecosystem. It also pressures Google to consider a more robust ZIP‑handling library or stricter validation in future releases. Until a fix arrives, the safest mitigation is to avoid installing APKs from untrusted sources and to keep USB debugging disabled, limiting an attacker’s ability to delete the harmful file via ADB.

Cover: Acabashi · CC BY-SA 4.0 · Wikimedia Commons. Layout and headline text by Signal Titans.

Source: New Android exploit only needs you to install an app to wreck your phone · GhostMap: The Android flaw that crashes your phone before you open the app

Share this article
FacebookThreadsLinkedInX

Leave a Reply

Your email address will not be published. Required fields are marked *