Skip to main content
Be Bitwise

Baseband Processor Security

Mobile Network Security · Mobile Exploitation track

11 min read

In this module

What Is the Baseband Processor?

Every mobile device contains at least two distinct processors. The application processor (AP) runs the operating system (iOS, Android) and the apps you actually interact with. The baseband processor (BP), also called the modem or radio processor, handles all cellular radio communication. It encodes and decodes radio signals, manages the air interface protocol stack, handles handovers between cells, and processes signalling messages from the network.

The baseband processor is, in effect, a second computer hiding inside your phone. It runs its own real-time operating system (RTOS), has its own RAM, and executes firmware that's entirely independent of the application processor's OS. When your phone connects to a cell tower, negotiates encryption, or processes an incoming SMS at the radio level, all of that happens over on the baseband, with the AP none the wiser.

Baseband Architecture

The Protocol Stack

The baseband processor implements the full cellular protocol stack, which is layers upon layers of fiddly protocols:

  • Layer 1 (Physical): Signal modulation/demodulation, OFDM processing, channel estimation, timing synchronisation. This is computationally intensive DSP (Digital Signal Processing) work.
  • Layer 2 (Data Link): MAC (Medium Access Control) scheduling, RLC (Radio Link Control) segmentation and reassembly, PDCP (Packet Data Convergence Protocol) header compression and ciphering.
  • Layer 3 (Network): RRC (Radio Resource Control) connection management, NAS (Non-Access Stratum) mobility management, and session management messages.

Each of these layers is parsing complex, variable-length messages pulled in over the air from sources you have no reason to trust. One malformed message at any layer can trip a vulnerability in the parser.

The RTOS

Baseband processors run proprietary real-time operating systems. Unlike general-purpose OSes such as Linux or Windows, they're built for deterministic timing because cellular protocols demand it. The baseband has to answer the network inside strict windows measured in milliseconds.

Common baseband RTOS platforms include:

  • Qualcomm AMSS/QuRT: Qualcomm's proprietary RTOS running on Hexagon DSP cores in their Snapdragon modems.
  • Samsung Shannon RTOS: Samsung's proprietary baseband OS used in Exynos-based devices.
  • MediaTek baseband RTOS: MediaTek's proprietary system used in their Dimensity and Helio chipsets.
  • Intel/Infineon XGold RTOS: Previously used in older iPhones (before Apple's switch to Qualcomm and later their own modems).

All closed-source, proprietary systems. Security researchers have to reverse-engineer the firmware to study them, which keeps the pool of people capable of finding and reporting bugs uncomfortably small.

Baseband as a Black Box

The proprietary nature of baseband firmware creates a security paradox. The baseband processor is one of the most security-critical components in a mobile device - it processes untrusted data from the radio interface - yet it is also one of the least audited. The firmware is closed-source, the RTOS is undocumented, and the hardware interfaces are proprietary. Security researchers who analyse basebands typically do so by extracting firmware from device flash storage and reverse-engineering it with tools like Ghidra or IDA Pro.

The Baseband Attack Surface

The baseband processor is an attacker's dream target, for several converging reasons:

Remote, Zero-Click Exploitation

The baseband sits in a constant state of listening, processing every message the cellular network throws at it. An attacker who can transmit crafted radio signals (an SDR, or a rogue base station) can send malicious protocol messages straight at the target's baseband. The user does nothing. The baseband processes the messages all by itself. That makes baseband exploits inherently zero-click and remote.

Lack of Exploit Mitigations

Modern application processors benefit from decades of exploit mitigation research: ASLR, stack canaries, W^X memory, control-flow integrity, PAC. Baseband processors have spent that whole period running miles behind:

  • No ASLR: Many baseband firmwares load at fixed addresses, making ROP gadget locations predictable.
  • No stack canaries: Stack buffer overflows can overwrite return addresses without detection.
  • No W^X enforcement: Memory regions may be simultaneously writable and executable, allowing direct shellcode injection.
  • No heap hardening: Heap metadata is often unprotected, enabling classic heap exploitation techniques.

This is slowly improving. Recent Qualcomm and Samsung basebands have started rolling in some mitigations. The gap between baseband and application processor security is still a chasm.

Here's how those missing mitigations combine with a single parsing slip. Protocol messages are full of TLV (type, length, value) information elements, and the length byte comes straight off the air. A toy parser in the style of the real bugs:

c
void parse_ie(const uint8_t *ie) {
uint8_t value[16];
uint8_t len = ie[1]; /* attacker-controlled: 0 to 255 */
memcpy(value, &ie[2], len); /* never compared with sizeof(value) */
/* ... */
}

A rogue base station sends an element with a length of 22 instead of something that fits in 16. The frame below shows the stack afterwards (bytes illustrative): 16 bytes of 0x41 fill the buffer, the next four 0x42 bytes land on saved registers, and 0x43 sits where the return address was. No canary stands in the way, and with fixed load addresses the attacker already knows what to put there.

Stack Frame View

0041Buffer← SP
0141Buffer
0241Buffer
0341Buffer
0441Buffer
0541Buffer
0641Buffer
0741Buffer
0841Buffer
0941Buffer
0A41Buffer
0B41Buffer
0C41Buffer
0D41Buffer
0E41Buffer
0F41Buffer
1042Saved regs
1142Saved regs
1242Saved regs
1342Saved regs
1443Return addr
1500Return addr
1600Return addr
1700Return addr
1800Return addr
1900Return addr
1A00Return addr
1B00Return addr
Regions
Buffer16 B
Saved regs4 B
Return addr8 B
0x0000000000000043
Overflow direction
Buffer→Saved regs→Return addr

Privileged Hardware Access

The baseband processor frequently has uncomfortable amounts of access to the rest of the device's hardware:

  • Shared memory regions: The baseband and AP communicate through shared memory, which in some architectures isn't properly isolated. A compromised baseband may be able to read or write AP memory directly.
  • DMA (Direct Memory Access): Some baseband architectures use DMA to push data to and from the application processor. Without an IOMMU enforcing access controls, DMA waltzes straight past all software-based memory protections.
  • SIM card access: The baseband talks directly to the SIM card for authentication operations, giving it access to the cryptographic key material.

Notable Baseband Vulnerabilities

Samsung Shannon Baseband Exploits

The Samsung Shannon baseband, riding inside Samsung's Exynos chipsets, has been a hotbed of security research for years. Academic and industry teams emulating and fuzzing the firmware found memory corruption vulnerabilities in its over-the-air message parsers, the code that decodes signalling such as NAS and RRC messages. Those bugs are reachable by anyone running a rogue base station within radio range.

The Shannon firmware also turned out to have no ASLR and limited stack protection. Code and data loaded at predictable addresses, which made exploitation considerably easier than it should have been. A malformed message could overflow a stack buffer in the baseband and pop remote code execution. No user interaction. No notification on the screen.

In March 2023, Google's Project Zero went further. It reported 18 vulnerabilities in Exynos modems, four of which allowed Internet-to-baseband remote code execution, including CVE-2023-24033 in the handling of SDP attributes during VoLTE call setup. Those four didn't need a rogue base station at all: the attacker only needed the victim's phone number.

Shannon Baseband RCE

Research on the Samsung Shannon baseband showed that remote code execution was achievable without any user interaction. Over the air, a rogue base station sending crafted signalling messages could overflow a stack buffer in a message parser; Project Zero's 2023 findings showed some bugs were reachable over the Internet with nothing more than a phone number. With no ASLR and no stack canaries, the exploit was straightforward: overwrite the return address to redirect execution to attacker-controlled code. The user's phone would show no indication of compromise.

Qualcomm MSM Vulnerabilities

Qualcomm's MSM (Mobile Station Modem) baseband is the most widely deployed in the world. It sits in a large share of Android devices and in many iPhone models too. Several major vulnerabilities have been disclosed:

CVE-2020-11292 was a heap buffer overflow in the QMI (Qualcomm MSM Interface) service, the layer brokering AP-to-baseband communication. A malicious app on the device could land code execution inside the baseband context, gaining a window into call history, SMS, and live voice conversations.

CVE-2023-33042 shows the over-the-air side. Qualcomm's December 2023 bulletin describes it as a transient denial of service in the modem after an RRC (Radio Resource Control) Setup message is received, one of several 5G modem bugs credited to Matheus Garbelini that month. A rogue 5G cell sending a malformed message can knock the phone off the network; repeated crashes can push it to fall back to an older generation, which is where the stronger 5G protections stop applying.

Huawei HiSilicon Baseband

Security researchers have also chased down vulnerabilities in Huawei's HiSilicon Balong baseband processor. Highlights include stack buffer overflows in LTE attach procedure handling, where parsing ATTACH ACCEPT messages with malformed optional information elements would corrupt the stack. Balong was found to lack stack cookies and ASLR, an unsettling echo of the Shannon findings.

Baseband-to-Application Processor Escalation

Compromising the baseband is rarely the end of the road. It's the first floor on a longer climb to the application processor and the main OS. The escalation path depends on the SoC architecture:

Shared Memory Attacks

On many SoCs, the baseband and AP share memory regions for inter-processor communication (IPC). Those regions carry modem status information, AT commands, call data, and network status. With the baseband compromised, an attacker can:

  1. Corrupt IPC messages to trigger vulnerabilities in the application processor's modem driver.
  2. Inject malicious data into shared buffers that the AP kernel trusts implicitly.
  3. Exploit race conditions in the shared memory protocol.

DMA Attacks

If the baseband has DMA access without an IOMMU keeping it on a leash, it can read and write arbitrary physical memory on the AP side. That walks straight past every software security mechanism — ASLR, stack canaries, page permissions, the lot — because DMA operates at the physical memory level, below the OS entirely.

Modern Baseband Isolation

Device manufacturers eventually clocked the baseband as a serious attack surface and have rolled out several isolation measures:

IOMMU Enforcement

Modern SoCs ship with an IOMMU (Input-Output Memory Management Unit) to restrict which physical memory regions the baseband can hit via DMA. The IOMMU is essentially a firewall for memory access: even with the baseband fully compromised, its DMA transactions are penned into pre-configured regions. Apple, Samsung, and Qualcomm have all baked IOMMU-based baseband isolation into their recent SoCs.

Separate Address Spaces

The baseband processor increasingly lives in a fully separate address space with no direct mapping to AP memory. Communication runs through a narrow, well-defined IPC channel — mailbox registers and ring buffers — rather than over broad shared memory regions.

Firmware Integrity

Modern devices verify baseband firmware integrity during boot using secure boot chains. The manufacturer signs the firmware, and the bootloader checks that signature before executing it. This shuts the door on persistent firmware modification, though it does nothing to stop runtime exploitation.

Hardware Security Boundaries

Apple's approach in recent A-series and M-series chips puts the baseband behind a hardware security boundary. The Secure Enclave Processor (SEP) and the AP kernel both refuse to trust data from the baseband on faith alone. Samsung's newer Exynos designs do something similar with hardware firewalls between the modem subsystem and the application processor.

Key Concept
Defence in Depth for Basebands

Modern SoC design treats the baseband processor as an untrusted component. Even though the baseband runs on the same chip as the application processor, hardware mechanisms (IOMMU, separate address spaces, hardware firewalls) constrain its access. This defence-in-depth approach means that even a fully compromised baseband cannot directly access application processor memory or bypass the main OS security. The escalation from baseband compromise to full device compromise now requires additional vulnerabilities in the IPC interface or IOMMU configuration.

Baseband Fuzzing and Research

Security researchers use several techniques to discover baseband vulnerabilities:

Over-the-Air Fuzzing

With software-defined radios (SDR) and open-source cellular stacks like srsRAN or Open5GS, researchers spin up miniature cellular networks inside a shielded environment. From there, they fuzz the baseband with malformed protocol messages and watch for crashes. This tests the baseband in its natural habitat, but it demands specialised radio gear and a working knowledge of cellular protocols.

Firmware Emulation

Tools like FirmWire (presented at NDSS 2022 by researchers from the University of Florida, VU Amsterdam, TU Berlin and Ruhr University Bochum) emulate baseband firmware purely in software, opening the door to rapid fuzzing without any physical radio kit at all. The emulator intercepts hardware-specific operations and routes them to software stubs, letting the baseband RTOS run on a standard computer. Fuzzing throughput leaps by orders of magnitude.

Static Analysis

Reverse-engineering extracted baseband firmware with Ghidra or IDA Pro lets researchers hunt for the usual culprits: unchecked buffer lengths in message parsers, missing bounds validation on TLV (Type-Length-Value) fields, integer overflow conditions in size calculations. The catch is that you need a deep grasp of cellular protocols just to figure out which function parses which message type.

These three approaches together have driven a sharp uptick in reported baseband vulnerabilities over recent years, pushing manufacturers to actually start investing in baseband mitigations and hardening — though they're still playing catch-up.