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

Insufficient validation of untrusted input in Metrics (CVE-2026-12465)

A compromised renderer can write malformed metrics data to shared memory, causing the browser to fall back to a static DummyHistogram singleton. If a histogram with the same name is already registered, the browser attempts to delete the static singleton, leading to allocator corruption or a crash.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 12 days

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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A compromised renderer process can potentially trigger an invalid free of the static DummyHistogram singleton in the browser process. By writing malformed metrics data to the shared memory region, the renderer can force the browser to deserialize an invalid histogram that falls back to the static DummyHistogram singleton. If a histogram with the name 'dummy_histogram' was already registered, the browser attempts to delete the duplicate, invoking 'delete' on non-heap static storage.

Affected files:

  • base/metrics/persistent_histogram_allocator.cc
  • base/metrics/histogram.cc
  • base/metrics/statistics_recorder.cc

Estimated timestamp from git blame: 2022-02-16

Description

Static analysis of the Chromium metrics subsystem indicates a potential vulnerability where a compromised renderer process can trigger an invalid delete of the static DummyHistogram singleton in the browser process, leading to allocator corruption or a browser crash.

Root Cause Analysis

  1. Unconditional Registration/Deletion in Persistent Allocator: In base/metrics/persistent_histogram_allocator.cc:751-758, GetOrCreateStatisticsRecorderHistogram() deserializes histogram information from shared memory and unconditionally registers the result using StatisticsRecorder::RegisterOrDeleteDuplicate():

    C++
    existing = DeserializeHistogramInfo(&iter, mapper);
    if (!existing) {
      return nullptr;
    }
    // ...
    return StatisticsRecorder::RegisterOrDeleteDuplicate(existing);
    
  2. Fallback to Static Singleton: If the construction arguments serialized in shared memory fail validation checks in the browser process, Histogram::DeserializeInfoImpl() -> Histogram::FactoryGetInternal() returns the static DummyHistogram singleton instead of allocating a new histogram on the heap:

    C++
    // base/metrics/histogram.cc:752-773
    HistogramBase* Histogram::FactoryGetInternal(...) {
      const auto validity = InspectConstructionArguments(name, name_hash, &minimum, &maximum, &bucket_count);
      if (validity != kOK) {
        // ...
        base::debug::DumpWithoutCrashing();
        return DummyHistogram::GetInstance(); // <-- Returns static singleton
      }
      return Factory(name, name_hash, minimum, maximum, bucket_count, flags).Build();
    }
    
  3. Deallocation on Collision: StatisticsRecorder::RegisterOrDeleteDuplicate(histogram) takes ownership of the passed pointer and deletes it if a different object with the same name hash is already registered:

    C++
    // base/metrics/statistics_recorder.cc:180-187
    if (histogram == registered) {
      return histogram;
    }
    // We already have a histogram with this name.
    histogram_deleter.reset(histogram); // <-- Invokes delete on the static singleton
    return registered;
    

    The name hash of DummyHistogram is HashMetricName("dummy_histogram"). If any histogram with this name (or a colliding hash) is already registered when the malformed record is parsed, the static DummyHistogram singleton is deleted.

Potential Trigger Steps

As we currently do not have the capability to execute code or run runtime environments to construct a working PoC, the following are the potential steps an attacker might take to trigger this flow from a compromised renderer:

  1. Locate and map the writable shared memory region assigned for UMA metrics (UnsafeSharedMemoryRegion).
  2. Write a valid PersistentHistogramData structure named "dummy_histogram" to the shared memory segment, causing the browser to heap-allocate and register it in the StatisticsRecorder during its periodic merge phase.
  3. Write a second, malformed PersistentHistogramData structure sequentially afterward. Set its parameters to trigger a validation failure (for example, setting minimum == maximum and bucket_count == 2), while ensuring the ranges array remains sorted and unique to pass early-stage allocator checks.
  4. When the browser merges this second record, DeserializeHistogramInfo will fall back to returning DummyHistogram::GetInstance().
  5. The browser then calls RegisterOrDeleteDuplicate() with the singleton. It detects a duplicate at the "dummy_histogram" hash slot, and attempts to run delete on the static NoDestructor<DummyHistogram> storage.

Proposed Fix

Prevent the registration of DUMMY_HISTOGRAM types in GetOrCreateStatisticsRecorderHistogram() before they are passed to the StatisticsRecorder. If the deserialized histogram is a dummy histogram, discard it safely:

C++
// base/metrics/persistent_histogram_allocator.cc
existing = DeserializeHistogramInfo(&iter, mapper);
if (!existing) {
  return nullptr;
}
if (existing->GetHistogramType() == HistogramBase::DUMMY_HISTOGRAM) {
  return nullptr;
}

Evaluated with Chrome root at commit: d8b226a3be7c9c1ac9240c09e14698866c82e4ac


Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:

  • If you are familiar with the severity guidelines, you may adjust the severity.
  • If this is a false positive, and there's no work to be done, please close as WAI.
  • If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.

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

Impact

A compromised renderer could cause allocator corruption or a browser crash, but the report does not demonstrate code execution.

What the attacker needed

Compromised renderer process; ability to write to shared memory

The fix

The fix should discard any deserialized histogram of type DUMMY_HISTOGRAM before passing it to the StatisticsRecorder.

How it was found

  1. Locate and map the writable shared memory region for UMA metrics.
  2. Write a valid PersistentHistogramData named 'dummy_histogram' to the shared memory so the browser registers it.
  3. Write a second malformed PersistentHistogramData that fails validation but passes early allocator checks.
  4. When the browser merges the second record, it falls back to DummyHistogram::GetInstance().
  5. The browser calls RegisterOrDeleteDuplicate() with the singleton, detects a duplicate, and attempts to delete the static storage.

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 renderer is the part of the browser that runs web pages. It can share some memory with the browser process, which is more trusted. Here, the renderer can write bad data into that shared memory, and the browser then tries to free a fixed, non-heap object, which is not allowed and can crash or corrupt memory.

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.