GhostMap: Malformed Android APK Triggers Persistent Crash Loop Without User Interaction
What Happened — Bitdefender Labs discovered that a specially crafted Android package (APK) can crash a device’s core system process during installation, forcing the phone into a perpetual reboot loop. The APK contains no executable code, requests no permissions, and the crash occurs because Android mis‑interprets malformed ZIP‑header fields, mapping memory beyond the file’s actual size. Recovery requires a factory reset, erasing all user data; the issue affects Android 10 and newer, including the latest Pixel 10 with the August 2026 security patch. Google has classified the finding as “won’t fix” for now.
Bitdefender Labs researchers Alecsandru Cătălin Daj and Alex BaciU disclosed a new Android vulnerability they dubbed “GhostMap” after noticing that a malicious APK collected from the wild caused their analysis emulators to crash during installation on 12 August 2026. The sample, a banking‑dropper that never executed, triggered a failure in the operating system’s handling of ZIP entries: Android misinterprets the compression method and the declared uncompressed length, causing a SIGBUS when the file is memory‑mapped. The flaw does not require any permissions, code execution, or even opening the app—simply installing the crafted package forces a core system process to crash, restart, and crash again, locking the device in a boot‑loop that persists through normal reboots and safe mode.
The researchers reproduced the issue on a Pixel 10 running Android 17 with the 5 August 2026 security patch, confirming that every version from Android 10 onward is vulnerable. Because the offending file cannot be removed by the system’s file manager—even in safe mode—recovery typically demands a factory reset, which erases all user data. The only practical workaround, they noted, is to have USB debugging enabled beforehand and use ADB (Android Debug Bridge) from a computer to delete the malicious APK before the system‑server crashes again.
Bitdefender reported the findings to Google through the Android & Devices Vulnerability Reward Program on 20 August 2026 and followed up with additional evidence on 25 August 2026 after confirming a persistent denial‑of‑service scenario. Google’s response classified the submission as “Won’t Fix (Not Reproducible)” and said the issue was “outside the program’s scope,” referring it to a feature team for possible future consideration rather than a security update. The researchers emphasized that, while they have not observed the technique used in the wild beyond the initial banking dropper, the bug could be weaponized for extortion—forcing victims to perform a factory reset or risk data loss.
The underlying problem stems from Android’s trust in size and compression metadata within APK files, a weakness that also affected a 2016 vulnerability (CVE‑2016‑6724) in the Input Manager Service. That earlier flaw, rated Moderate at the time, required a factory reset to resolve and was patched across Android 4.4.4 to 7.0. According to Google’s current severity guidelines, a condition that forces a permanent factory reset is now classified as High, underscoring the significance of GhostMap’s persistent denial‑of‑service impact.
On 25 August 2026 the researchers filed a second disclosure with Google, attaching a functional proof‑of‑concept and step‑by‑step reproduction guide. Their analysis showed that the malicious APK required no permissions, contained no executable payload and never needed to be launched. Google replied that the flaw fell outside the remit of a conventional security‑update patch, but said it had passed the report to the appropriate engineering group for review and possible inclusion in a future release.
The problem belongs to a class of “parser differential” bugs that have plagued Android for more than ten years. A 2014 research paper, Leaving our ZIP undone: How to abuse zip to deliver malware apps, documented how malformed ZIP structures can evade antivirus unarchiving. Because an APK is essentially a ZIP archive, the same metadata—sizes, offsets and compression flags—appears in several locations without cross‑validation, and Android’s multiple components read the file using distinct code paths. When those components interpret the same bytes differently, a security flaw emerges.
Earlier incidents illustrate the pattern. The 2013 Master Key bug (CVE‑2013‑4787) placed two files with identical names in an APK, causing the signature check to validate one while the installer executed the other. In 2017 Janus (CVE‑2017‑13156) a file could simultaneously be a valid APK and a valid DEX because the signature verifier ignored extra leading bytes that the runtime later executed. BadPack, reported in 2024, deliberately corrupted ZIP headers so that analysis tools failed while phones installed the package unhindered. Palo Alto Networks’ Unit 42 counted roughly 9,200 samples of this packing technique in a single year, noting its use by banking trojans such as Anatsa, Cerberus and BianLian. The newly disclosed flaw follows the same mismatch logic, but instead of sneaking code it forces the target process to crash.
When Android opens an APK, the libziparchive library reads each ZIP entry and validates that, for entries marked “stored”, the declared uncompressed length does not exceed the actual data region. The check is omitted for any other compression method, because deflated entries only need the compressed size to allocate a temporary buffer. Since the ZIP method field is a 16‑bit value, values outside the two defined constants (stored = 0, deflated = 8) are technically permissible, yet libziparchive never validates them.
A second component, libandroidfw, loads resources and treats any entry that is not explicitly deflated as stored, mapping the file directly at the declared uncompressed length without any bounds verification. Consequently, an entry flagged with an undefined method is mapped far beyond the real file size; the kernel permits the oversized mapping because the extra region simply contains no data. The first read that reaches this phantom area triggers a processor fault, which the Android runtime does not catch, leading the kernel to terminate the process with a SIGBUS. On a Pixel 10 device the resulting tombstone shows a crash in __memcpy_aarch64_simd (libc.so) followed by reads in _FileAsset::read (libandroidfw.so) and NativeAssetReadChar (android_runtime.so), with a few‑kilobyte APK being mapped across sixteen megabytes and the fault address landing well past the file’s end.
Two distinct read patterns can expose the oversized mapping. In the piece‑wise scenario captured by the tombstone, the code reads the entry in small chunks, each bounded only by the bogus size, eventually overrunning the file and faulting. In the alternative path, Android requests the entire entry in one block—such as when loading an XML resource or an app icon—and before handing the buffer to the caller it checks alignment constraints; the mis‑aligned, over‑mapped region causes an immediate crash.
The fault lives in Asset.cpp ( frameworks/base/libs/androidfw/Asset.cpp ) where the function _FileAsset::ensureAlignment creates a buffer sized to the declared length of a ZIP entry, then copies mLength bytes from the file without checking that the file actually contains that many bytes. Because the declared length is fabricated, the memcpy runs past the end of the file and triggers a segmentation fault while the buffer is being filled, not while the file is being read. Android can reach this code via two distinct paths: streaming the entry piece‑by‑piece or loading it whole; the whole‑load path is used for resources such as icons, which is what makes the subsequent exploitation step possible.
The problem is amplified by inconsistent size checks across Android’s ZIP handling libraries. libziparchive correctly validates the uncompressed size, but only for entries stored without compression, skipping the check for all other methods. ZipFileRO takes a safer approach, using the uncompressed size for stored entries and the compressed size for everything else. By contrast, libandroidfw splits on whether an entry is deflated rather than whether it is stored, so it trusts the uncompressed size for entries that libziparchive never verified. Security researchers note that the ideal mitigation would be to accept only the stored and deflate methods and reject all others as invalid.
Because the vulnerable code is invoked by many components, any process that reads an APK can crash. During installation, the system parses the manifest first; a malformed manifest causes the installer to abort, leaving no trace on the device. If a malformed resource is read later by a core system service, the service runs inside system_server; the crash forces system_server to restart, which immediately re‑processes the same malformed file and crashes again, creating a perpetual crash loop that prevents the phone from booting. Rebooting, safe mode, or a simple ADB delete does not break the loop unless Developer Mode is already enabled, and even a full kernel reboot eventually hits the fault early in the boot sequence. The researchers reproduced the persistent crash loop on current hardware but have not observed it in the wild.
An attacker could exploit the bug in several denial‑of‑service ways. By corrupting a resource that a system service reads, the device can be rendered unusable until a factory reset wipes all data, effectively forcing the user to choose between a dead phone and a complete wipe. Alternatively, an app could embed a malformed icon; the launcher, Settings app list, and the app’s own info screen would all crash when trying to display the icon, making the app impossible to uninstall. Security tools that scan APKs would also crash because they invoke the same native parsing code, allowing malicious files to slip past detection. Although the flaw does not permit code execution or privilege escalation, it can still be weaponised for extortion or persistence. As of the report’s publication, no patch exists; the only practical mitigation is to detect the malformed ZIP entry before it is parsed. Bitdefender Mobile Security flags such files as Android.Riskware.Ghostmap.rA and warns users, but Android’s security model prevents a third‑party app from blocking the installation or removing the offending app without user intervention.
The flaw was reproduced on a Pixel 10 running Android 17 with the August 5 2026 security patch (build google/frankel/frankel:17/CP2A.260805.005/15828068:user/release‑keys). Bitdefender’s team also confirmed that the vulnerability can be triggered on any Android release from version 10 onward.
When the system_server process died, the generated tombstone showed a SIGBUS (signal 7) with a BUS_ADRERR code. The fault originated in a memcpy routine in libc.so, propagating through android::_FileAsset::read and other framework components. The APK file on disk measured only 8,408 bytes, yet the system mapped it as a ~16 MB region—the size declared by the file’s header—and the fault occurred roughly 197 KB beyond the actual end of the file, indicating an over‑read rather than memory corruption.
A regular third‑party app that invoked PackageManager.getPackageArchiveInfo() experienced the same native crash. The call, which a scanner uses to read the APK, failed inside android::_FileAsset::getIncFsBuffer and android::NativeOpenXml, producing another SIGBUS. Because the crash occurred at the native level, a Java‑level catch (Throwable) never intercepted it, and the process terminated. This confirmed that both the system_server and ordinary apps follow the same vulnerable code path.
Each crash triggered an immediate restart of system_server, producing a new PID within seconds. Log entries recorded three successive cycles at 08:24:32, 08:24:38, and 08:24:42, each followed by a termination message a second later. Enabling safe mode did not break the loop; after the “SAFE MODE ENABLED” flag appeared, the same fatal signal was logged, and the pattern repeated for 72 cycles in that run. In one test the crash‑restart cycle persisted for 110 iterations, keeping the device stuck on the boot animation. The researchers—Alecsandru Cătălin DAJ, team lead of Bitdefender’s Mobile Security & Forensics Unit, and junior researcher Alex BACIU—note that the issue remains unpatched by Google at the time of publication.
Why It Matters for Trust & Control Assurance — The flaw highlights a gap in vulnerability‑management controls: without continuous evidence that platform components correctly validate input, a seemingly benign app can deny service and be leveraged for extortion.
Who Is Affected — Mobile device manufacturers, enterprise mobile‑device‑management (MDM) providers, app developers, and any organization that distributes or consumes Android applications.
Recommended Actions —
- Update your MDM policies to block installation of unsigned or unverified APKs and enforce “install from trusted sources only.”
- Deploy endpoint‑detection tools that can flag repeated crash loops and trigger automated quarantine or remote wipe before a factory reset is needed.
- Maintain an inventory of Android OS versions in use and prioritize devices running Android 10‑17 for additional monitoring.
Source: Bitdefender Labs – GhostMap
Technical Notes — The vulnerability stems from inconsistent handling of the ZIP entry’s compression method and declared uncompressed length between libziparchive and libandroidfw. When the method is neither “stored” nor “deflated,” libandroidfw maps the file at the declared uncompressed size without bounds checking, leading to a SIGBUS fault. The issue reproduces on Android 10+ and is not addressed in the current security patch cycle. Source: Bitdefender Labs – GhostMap