Skip to content
Memory corruption Advisory Advanced CVE-2026-19138

Heap buffer overflow in CrashReporting (CVE-2026-19138)

A heap out-of-bounds write and integer underflow in Crashpad's stack sanitisation logic can be triggered by a compromised renderer sending a crafted crash dump request. This corrupts memory in the unsandboxed crash handler and could theoretically lead to a sandbox escape via a race condition.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 4 months

Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports without the security team.

Overview: A compromised renderer can trigger a heap out-of-bounds write and massive memory corruption in the unsandboxed chrome_crashpad_handler by requesting a stack-sanitized crash dump. By manipulating a thread's Stack Pointer and TLS registers, the attacker forces an integer underflow during buffer sanitization. While this heavily corrupts memory and guarantees an eventual crash, exploiting a race condition could theoretically lead to a sandbox escape.

Affected files:

  • third_party/crashpad/crashpad/snapshot/sanitized/memory_snapshot_sanitized.cc
  • third_party/crashpad/crashpad/snapshot/memory_snapshot_generic.h

Estimated timestamp from git blame: 2023-04-10

Summary

A potential heap out-of-bounds (OOB) write and integer underflow exists in the stack sanitization logic of Crashpad. The vulnerability occurs when the MemorySanitizer processes a highly specific, attacker-controlled stack memory region that is very small (e.g., 1 byte) and unaligned. This can be triggered by a compromised renderer process, potentially leading to a sandbox escape via memory corruption in the privileged chrome_crashpad_handler process.

Root Cause Analysis

The vulnerability is located in third_party/crashpad/crashpad/snapshot/sanitized/memory_snapshot_sanitized.cc within the MemorySanitizer::Sanitize template function:

C++
    // Sanitize up to a word-aligned address.
    const size_t aligned_offset =
        ((address_ + sizeof(Pointer) - 1) & ~(sizeof(Pointer) - 1)) - address_;
    memcpy(data, &defaced, aligned_offset);

    // Sanitize words that aren't small and don't look like pointers.
    size_t word_count = (size - aligned_offset) / sizeof(Pointer);

The aligned_offset is calculated as the distance from the region's base address_ to the next word-aligned boundary. For a 64-bit architecture, this can be up to 7 bytes.

The function crucially assumes that size >= aligned_offset. If an attacker can force a situation where size < aligned_offset, two critical memory corruptions occur:

  1. Heap OOB Write: The memcpy writes aligned_offset bytes (e.g., 7) of the defaced constant into data. If the underlying heap buffer is only size bytes (e.g., 1 byte), this overflows the buffer.
  2. Integer Underflow: The calculation (size - aligned_offset) uses unsigned arithmetic (size_t). When size < aligned_offset, this underflows to a massive value (e.g., ~0x1FFFFFFFFFFFFFFE). The subsequent loop iterates over this massive word_count, blindly overwriting vast swathes of the handler's heap memory with 0x0defaced0defaced until the process hits an unmapped page and crashes.

Potential Attack Steps

Note: These are suggested steps; we do not currently have a working proof of concept to run this exploit end-to-end.

  1. A compromised renderer process creates a new thread.
  2. The attacker manipulates the thread's registers to craft an invalid stack layout:
    • Sets the Stack Pointer (SP) to an unaligned memory address X, where X % 8 == 1.
    • Sets the Thread Local Storage (TLS) register to X + 1.
  3. The attacker creates a SanitizationInformation struct in its memory and sets sanitize_stacks = true.
  4. The attacker sends a kTypeCrashDumpRequest IPC to the unsandboxed chrome_crashpad_handler, pointing to this struct.
  5. The handler's ProcessReaderLinux::Thread::InitializeStackFromSP logic calculates the thread's stack size as tls_address - stack_region_address. Due to the attacker's setup (X + 1 minus X), the stack size is evaluated as 1 byte.
  6. The handler allocates a 1-byte heap buffer for the stack snapshot and passes it to MemorySanitizer::Sanitize.
  7. Sanitize evaluates aligned_offset as 7, triggering the out-of-bounds memcpy and the integer underflow.
  8. The massive memory corruption loop races against other handler threads (like the upload thread). If the attacker can win a race condition using the corrupted heap state before the inevitable segmentation fault, this could result in arbitrary code execution (sandbox escape).

Suggested Fix

Add bounds checking in MemorySanitizer::Sanitize to ensure that aligned_offset does not exceed the buffer size.

C++
    // Sanitize up to a word-aligned address, bounded by the region size.
    const size_t aligned_offset = std::min(
        size,
        ((address_ + sizeof(Pointer) - 1) & ~(sizeof(Pointer) - 1)) - address_);
    memcpy(data, &defaced, aligned_offset);

    // Sanitize words that aren't small and don't look like pointers.
    size_t word_count = (size - aligned_offset) / sizeof(Pointer);

Evaluated with Chrome root at commit: f200f57a19490707ff8bc7aa5de3cbc443a3afad


Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The code assumes the buffer size is at least as large as the alignment offset, but an attacker can make the size smaller, causing an out-of-bounds write and an unsigned integer underflow.

Impact

This heavily corrupts memory and guarantees an eventual crash, but exploiting a race condition could theoretically lead to a sandbox escape.

What the attacker needed

Compromised renderer process; ability to send IPC to crash handler

The fix

Add bounds checking in MemorySanitizer::Sanitize to ensure that aligned_offset does not exceed the buffer size.

How it was found

  1. A compromised renderer process creates a new thread.
  2. The attacker manipulates the thread's registers to craft an invalid stack layout.
  3. The attacker creates a SanitizationInformation struct in its memory and sets sanitize_stacks = true.
  4. The attacker sends a kTypeCrashDumpRequest IPC to the unsandboxed chrome_crashpad_handler, pointing to this struct.
  5. The handler calculates the thread's stack size as 1 byte.
  6. The handler allocates a 1-byte heap buffer and passes it to MemorySanitizer::Sanitize, triggering the overflow.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A compromised renderer process can send a special request to the crash handler, which runs with higher privileges. The crash handler then miscalculates a buffer size, writing past the end of a small memory buffer and corrupting lots of memory. This could let an attacker escape the browser's sandbox, though it is very hard to exploit.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.