Skip to content
DoS Advisory Advanced CVE-2026-10987

Integer overflow in V8 (CVE-2026-10987)

An AI-assisted code review found a potential signed integer overflow in V8's Sparkplug baseline compiler when estimating instruction buffer size for extremely large functions. The overflow bypasses an initial 512 MiB capacity check, but existing 64-bit size checks in the buffer growth path limit the outcome to a controlled out-of-memory crash rather than memory corruption.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 13 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 potential signed integer overflow in V8's Sparkplug (baseline) compiler during instruction size estimation could allow very large functions to bypass an initial size check. This leads to the allocation of a minimal buffer that subsequently grows until it hits a strictly enforced 512MB limit, resulting in a controlled process termination.

Affected files:

  • v8/src/codegen/x64/assembler-x64.cc
  • v8/src/baseline/baseline-compiler.cc
  • v8/src/codegen/assembler.cc
  • v8/src/codegen/arm64/assembler-arm64.cc
  • v8/src/baseline/baseline.cc
  • v8/src/codegen/compiler.cc
  • v8/src/execution/tiering-manager.cc

Estimated timestamp from git blame: 2021-04-21

Potential Vulnerability Summary

A potential signed integer overflow exists in the V8 baseline compiler's initial buffer allocation logic. For functions with extremely large bytecode arrays, the estimated machine code size can overflow a 32-bit signed integer, bypassing a capacity check and leading to an inefficient initial allocation. However, current safeguards in the assembler's buffer growth logic prevent this from escalating into a memory corruption vulnerability.

Technical Analysis

When V8's Sparkplug compiler prepares to compile a function, it estimates the required instruction buffer size using BaselineCompiler::EstimateInstructionSize. On most architectures, this estimate is calculated by multiplying the BytecodeArray length by 7.

For functions with very large bytecode arrays (approximately 306.8 MiB or larger), the result of this multiplication can overflow a 32-bit signed integer, wrapping around to a negative value. In baseline::AllocateBuffer, this overflowed value is checked against Assembler::kMaximalBufferSize (512 MiB). Because the value is negative, the check is bypassed, and a call to NewAssemblerBuffer is made.

Inside the buffer allocation logic, the negative size is processed by std::max(kMinimalBufferSize, size), resulting in the allocation of a minimal 128-byte buffer. As the compiler begins to emit instructions into this buffer, it quickly triggers a call to Assembler::GrowBuffer.

In current V8 versions, architecture-specific GrowBuffer implementations utilize the ComputeNewBufferSize helper. This helper employs 64-bit integer arithmetic (int64_t) for size calculations and performs a strict check against the 512 MiB kMaximalBufferSize before any reallocation occurs. If the compiler attempts to emit more code than the limit allows, V8 triggers a controlled FatalProcessOutOfMemory (OOM) crash.

Potential Attack Steps

  1. A potential attacker defines a JavaScript function containing a massive number of bytecodes (e.g., millions of simple logical operations) designed to produce a BytecodeArray exceeding 306.8 MiB.
  2. The attacker triggers Sparkplug compilation of this function (e.g., by repeatedly calling it until it tiers up).
  3. The estimation logic overflows, bypassing the initial 512 MiB check and initializing the compiler with a 128-byte buffer.
  4. As the compiler attempts to grow the buffer incrementally to accommodate the JIT code, it eventually reaches the 512 MiB cap.

Impact and Fix Recommendation

The current impact is limited to a Denial-of-Service (DoS) via a process crash when extremely large functions are encountered. The reported sandbox bypass and linear heap overflow are mitigated by the robust size checks in ComputeNewBufferSize and the 512 MiB limit on the code buffer size.

To resolve the underlying logic flaw, we recommend using size_t or base::CheckedNumeric for all instruction size estimations and buffer allocation checks in v8/src/baseline/baseline-compiler.cc to prevent integer overflows during the estimation phase.

Note: These are potential steps based on code analysis; our current tooling does not allow for a live proof-of-concept execution.

Evaluated with Chrome root at commit: 29093e11cf509e3593f6229e4b1b075cca356049


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

Root cause

Likely the instruction size estimate multiplies the bytecode length by a constant in 32-bit signed arithmetic, so very large functions wrap to a negative value that passes the maximum-size check.

Impact

Impact is limited to a denial of service through a controlled process crash; the claimed sandbox bypass and heap overflow are blocked by the 64-bit size checks and the 512 MiB code buffer limit.

What the attacker needed

Ability to run JavaScript in V8; function with ~306.8 MiB of bytecode; repeated calls to trigger tier-up

The fix

The estimation and allocation checks should use size_t or checked arithmetic to prevent the overflow; the text does not say a fix was applied.

How it was found

  1. Define a JavaScript function with a huge number of bytecodes so its bytecode array exceeds roughly 306.8 MiB.
  2. Trigger Sparkplug compilation of that function, for example by calling it repeatedly until it tiers up.
  3. The size estimate overflows, the initial check is bypassed, and a minimal 128-byte buffer is allocated.
  4. As code is emitted the buffer grows until it reaches the 512 MiB cap.

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.

V8 is the JavaScript engine in Chrome. It turns your code into machine code, and before doing so it guesses how much memory it needs. If that guess is a very large number, it can wrap around to a negative one, so a safety check is skipped; here the engine still stops itself later, so the worst case is a crash, not an attacker taking over.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.