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

Heap buffer overflow in WebML (CVE-2026-5869)

The WebNN validation for grouped convolution only checked that input channels are divisible by groups, not output channels. An attacker could supply a filter with output channels not divisible by groups, causing the TFLite reference kernel to read past the input tensor's heap buffer in the GPU process.

c6eed09fc8b174b0f3eebedcceb1e792 Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 21 days

Missing output channel divisibility check in grouped convolution leads to heap OOB read in the GPU process via WebNN

Summary

The WebNN validation for conv2d with groups > 1 checks that input_channels % groups == 0 but omits the symmetric check that output_channels % groups == 0. When an attacker supplies a filter with an output channel count not divisible by the group count, the TFLite reference convolution kernel computes a truncated filters_per_group value that causes the inner loop to read input channels beyond the tensor boundary. Because the WebNN TFLite backend supplies input tensor data through SetCustomAllocationForTensor, the input buffer is a standalone heap allocation, and the out-of-bounds read is a direct heap overflow in the GPU process. Affected platforms: all platforms where the TFLite WebNN backend is active (Linux, macOS, Windows, ChromeOS).

Bisect

TFLite upstream — grouped conv reference kernel introduced

This commit introduced const int groups = input_depth / filter_input_depth; const int filters_per_group = output_depth / groups; in reference/conv.h without checking output_depth % groups == 0. Integer division truncation causes filters_per_group to be too small, so the last few output channels compute a group index of groups (out of range [0, groups-1]), leading to OOB reads on the input tensor.

Became web-reachable

This commit added SerializeConv2d to the WebNN TFLite graph builder. It used IsDepthwiseConv2d() to route depthwise cases but let all other grouped conv (groups > 1) fall through to TFLite's CONV_2D operator without rejecting or validating output_channels % groups == 0.

Root Cause

When a WebNN conv2d operation specifies groups > 1, the validation in ValidateConv2dAndInferOutput enforces only two constraints on the groups parameter:

C
// services/webnn/public/cpp/graph_validation_utils.cc:724-735
if (attributes.groups == 0) {
  return base::unexpected(
      ErrorWithLabel(label, "The groups should be greater than 0."));
}
if (input_info.channels % attributes.groups != 0 ||
    filter_input_channels != input_info.channels / attributes.groups) {
  return base::unexpected(ErrorWithLabel(
      label,
      "The groups must evenly divide the input channels to filter input "
      "channels."));
}

There is no check that output_channels % groups == 0. The TFLite conv::Prepare function similarly computes data->groups = input_channel / filter_input_channel without verifying the output side. When groups != 1, the TFLite evaluation path forces the reference kernel, which derives per-group assignments using truncated integer division:

C
// third_party/tflite/src/tensorflow/lite/kernels/internal/reference/conv.h:58-72
const int groups = input_depth / filter_input_depth;
const int filters_per_group = output_depth / groups;
...
for (int out_channel = 0; out_channel < output_depth; ++out_channel) {
  auto group = out_channel / filters_per_group;
  ...
  for (int in_channel = 0; in_channel < filter_input_depth; ++in_channel) {
    float input_value =
        input_data[Offset(input_shape, batch, in_y, in_x,
                          in_channel + group * filter_input_depth)];

When output_depth is not divisible by groups, filters_per_group is the floor of the true quotient. The remainder output channels produce a group index equal to groups itself rather than staying within the valid range [0, groups - 1]. The resulting channel offset in_channel + group * filter_input_depth then exceeds input_depth, causing a read past the end of the input tensor.

Consider a concrete construction: input shape [1, 1, 1, 100], filter shape [101, 1, 1, 50], and groups = 2. Validation passes because 100 % 2 == 0 and filter_input_channels == 50 == 100 / 2. The reference kernel then computes filters_per_group = 101 / 2 = 50. For out_channel = 100, group = 100 / 50 = 2, which is out of range. The inner loop reads at channel indices 100 through 149, which lie 200 bytes past the 400-byte input buffer.

The input tensor's backing memory is allocated by BufferContent::BufferContent through base::AlignedAlloc and installed via interpreter_->SetCustomAllocationForTensor. This is a standalone heap allocation with ASAN redzones, so the out-of-bounds read is a genuine heap overflow rather than an intra-arena access.

The same truncated-division pattern is replicated in the quantized and hybrid Conv reference kernels in reference/integer_ops/conv.h, making int8 and int16 variants equally reachable through the QDQ fusion path.

Reproduce

Tested at commit 7c89d33808e55 on Linux x64.

ASAN build configuration (out/asan-release/args.gn):

is_asan = true
is_debug = false
dcheck_always_on = false
target_cpu = "x64"
is_component_build = true

Serve the PoC and launch:

python3 -m http.server 8889 --directory issue_tflite002_grouped_conv_oob --bind 127.0.0.1 &
ASAN_OPTIONS=detect_odr_violation=0 out/asan-release/chrome \
  --no-sandbox \
  --enable-features=WebMachineLearningNeuralNetwork \
  --user-data-dir=/tmp/poc-$(date +%s) \
  http://127.0.0.1:8889/poc.html

The GPU process crashes within seconds with an ASAN heap-buffer-overflow READ:

==PID==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7d043c8b03e0
READ of size 4 at 0x7d043c8b03e0 thread T78 (ThreadPoolForeg)
    #0 tflite::reference_ops::Conv(...) reference/conv.h:90
    #1 tflite::ops::builtin::conv::EvalFloat<kReference>(...) conv.cc:995
    ...
    #7 webnn::tflite::GraphImplTflite::ComputeResources::DoDispatch(...) graph_impl_tflite.cc:328

0x7d043c8b03e0 is located 0 bytes after 416-byte region [0x7d043c8b0240,0x7d043c8b03e0)
allocated by thread T84 (ThreadPoolSingl) here:
    #1 base::AlignedAlloc(...) aligned_memory.cc:35
    #2 webnn::tflite::BufferContent::BufferContent(...) buffer_content_tflite.cc:33

SUMMARY: AddressSanitizer: heap-buffer-overflow reference/conv.h:90 in tflite::reference_ops::Conv(...)

The complete ASAN log is in asan.log.

Credit

Please use c6eed09fc8b174b0f3eebedcceb1e792 as the credit for this vulnerability. Thank you.

The original report as published on the Chromium issue tracker, by c6eed09fc8b174b0f3eebedcceb1e792. 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

Likely the validation for grouped convolution omitted the check that output channels are divisible by groups, and the TFLite reference kernel used truncated integer division to compute filters per group, leading to an out-of-range group index and out-of-bounds read.

Impact

An attacker could cause an out-of-bounds heap read in the GPU process, potentially leading to information disclosure or a crash, though the text only demonstrates a read overflow.

What the attacker needed

Chrome with WebNN feature enabled; Victim visits a malicious web page

How it was found

  1. Build Chrome with ASAN and the WebMachineLearningNeuralNetwork feature enabled.
  2. Serve a proof-of-concept HTML page that creates a WebNN conv2d operation with groups=2, input shape [1,1,1,100], and filter shape [101,1,1,50].
  3. Launch Chrome pointing to the PoC page.
  4. Observe the GPU process crash with an ASAN heap-buffer-overflow READ.

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 convolution is a common operation in machine learning that slides a filter over an image. When the filter is split into groups, the code must ensure both the input and output sizes divide evenly by the number of groups. Here, only the input side was checked, so a specially crafted filter could make the program read beyond the end of a memory buffer, which is a serious bug called a heap buffer overflow.

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 by c6eed09fc8b174b0f3eebedcceb1e792

View all

52 more disclosed reports, best first.

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.