Integer overflow in V8 (CVE-2026-11211)
A signed integer overflow in V8's Sparkplug baseline compiler causes a negative buffer size, bypassing an out-of-memory check and leading to a massive heap-based buffer overflow outside the V8 sandbox. An attacker could potentially achieve arbitrary code execution by exploiting this overflow with concurrent heap spraying.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 38 days
Project Fortify has identified a security issue and generated a PoC.
d8 variant: 'Default'
flags: --always-sparkplug --no-concurrent-sparkplug --omit-quit --fuzzing --disallow-unsafe-flags
Return code: 134
<details> <summary>stdout</summary>
#
# Fatal error in ../../v8/src/base/macros.h, line 432
# Debug check failed: x >= 0 (-1790490720 vs. 0).
#
#
#
#FailureMessage Object: 0x7ffd97ea4180
==== C stack trace ===============================
/home/rjlothian_google_com/chromium/src/out/Default/libv8_libbase.so(v8::base::debug::StackTrace::StackTrace()+0x1e) [0x73132fb33c5e]
/home/rjlothian_google_com/chromium/src/out/Default/libv8_libplatform.so(+0x1660d) [0x73132fae260d]
/home/rjlothian_google_com/chromium/src/out/Default/libv8_libbase.so(V8_Fatal(char const*, int, char const*, ...)+0x194) [0x73132fb15dc4]
/home/rjlothian_google_com/chromium/src/out/Default/libv8_libbase.so(+0x29675) [0x73132fb15675]
/home/rjlothian_google_com/chromium/src/out/Default/libv8.so(+0x24634fc) [0x731331fa24fc]
/home/rjlothian_google_com/chromium/src/out/Default/libv8.so(+0x32e0488) [0x731332e1f488]
/home/rjlothian_google_com/chromium/src/out/Default/libv8.so(+0x2211293) [0x731331d50293]
/home/rjlothian_google_com/chromium/src/out/Default/libv8.so(v8::internal::Compiler::CompileSharedWithBaseline(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SharedFunctionInfo>, v8::internal::Compiler::ClearExceptionFlag, v8::internal::IsCompiledScope*)+0x20d) [0x731331e315dd]
/home/rjlothian_google_com/chromium/src/out/Default/libv8.so(+0x22f3114) [0x731331e32114]
/home/rjlothian_google_com/chromium/src/out/Default/libv8.so(v8::internal::Compiler::GetFunctionFromEval(v8::internal::Isolate*, v8::internal::DirectHandle<v8::internal::String>, v8::internal::DirectHandle<v8::internal::SharedFunctionInfo>, v8::internal::DirectHandle<v8::internal::Context>, v8::internal::LanguageMode, v8::internal::ParseRestriction, int, int, v8::internal::ParsingWhileDebugging)+0x9a8) [0x731331e34ae8]
/home/rjlothian_google_com/chromium/src/out/Default/libv8.so(v8::internal::Compiler::GetFunctionFromValidatedString(v8::internal::Isolate*, v8::internal::DirectHandle<v8::internal::NativeContext>, v8::internal::MaybeDirectHandle<v8::internal::String>, v8::internal::ParseRestriction, int)+0x9d) [0x731331e3616d]
/home/rjlothian_google_com/chromium/src/out/Default/libv8.so(+0x2271e06) [0x731331db0e06]
/home/rjlothian_google_com/chromium/src/out/Default/libv8.so(+0x226e65b) [0x731331dad65b]
/home/rjlothian_google_com/chromium/src/out/Default/libv8.so(+0x226e41d) [0x731331dad41d]
/home/rjlothian_google_com/chromium/src/out/Default/libv8.so(+0x153bd3d) [0x73133107ad3d]
Received signal 6
Overview: V8's Sparkplug baseline compiler is vulnerable to a massive heap-based buffer overflow outside the V8 sandbox due to a signed integer overflow. Compiling extremely large functions causes Assembler::GrowBuffer to calculate a negative buffer size, bypassing an out-of-memory check. This results in gigabytes of machine code being written into a 128-byte heap allocation, allowing arbitrary code execution via concurrent heap spraying.
Affected files:
v8/src/codegen/x64/assembler-x64.ccv8/src/baseline/baseline-compiler.ccv8/src/codegen/assembler.ccv8/src/codegen/arm64/assembler-arm64.ccv8/src/codegen/ia32/assembler-ia32.ccv8/src/codegen/arm/assembler-arm.ccv8/src/codegen/riscv/assembler-riscv.ccv8/src/codegen/ppc/assembler-ppc.ccv8/src/codegen/s390/assembler-s390.ccv8/src/codegen/mips64/assembler-mips64.ccv8/src/codegen/loong64/assembler-loong64.cc
Estimated timestamp from git blame: 2021-04-21
Root Cause
When V8's Sparkplug compiler begins compiling a function, BaselineCompiler::AllocateBuffer estimates the required machine code buffer size. This is calculated as bytecode_length * 7 (on x64). For an exceptionally large BytecodeArray (e.g., ~154 MB), this initial allocation reaches ~1.07 GiB. Notably, this initial allocation lacks a check against kMaximalBufferSize (512 MiB).
If the generated machine code expands significantly (e.g., using bytecodes with large machine-code footprints), this 1.07 GiB buffer fills, triggering Assembler::GrowBuffer(). The root cause is a signed integer overflow when doubling the buffer size using 32-bit int arithmetic:
int old_size = buffer_->size(); // e.g., 1,078,984,704 (~1.07 GiB)
int new_size = 2 * old_size; // Overflow! Wraps to a negative value (e.g., -2,136,997,888)
Because new_size wraps to a negative value, the subsequent out-of-memory guard is completely bypassed:
// A negative value is less than kMaximalBufferSize (512 MiB)
if (new_size > kMaximalBufferSize) {
V8::FatalProcessOutOfMemory(nullptr, "Assembler::GrowBuffer");
}
The Overflow
The negative new_size is passed to buffer_->Grow(new_size). The allocation logic uses std::max(128, new_size), resulting in a new allocation of exactly 128 bytes on the C++ PartitionAlloc heap. MemMove then copies the original ~1.07 GiB of machine code into this 128-byte buffer, causing a massive out-of-bounds write.
Exploitation (V8 Sandbox Bypass)
The assembler buffer is allocated on the C++ heap, which resides outside the V8 sandbox. While the gigantic MemMove will eventually crash upon hitting an unmapped guard page, an attacker can exploit this via a concurrent Web Worker. By spraying the 128-byte bucket pool with target objects (like ArrayBuffer backing stores or function pointers), the worker can monitor the corruption and hijack control flow before the compiling thread reaches the guard page and segfaults.
Suggested Fix
- Use Checked Math: Change
old_sizeandnew_sizeinAssembler::GrowBuffer()tosize_t, or usebase::CheckedNumeric<int>to safely double the size and check for.IsValid()before proceeding. - Validate Initial Allocation: Add an explicit guard in
BaselineCompiler::AllocateBufferto ensure the initially calculatedestimated_sizedoes not silently exceedAssembler::kMaximalBufferSize.
Evaluated with Chrome root at commit: 380c72ddde1aa946561f639736dcc63b52d92a6f
The description of the vuln is LLM-generated and can contain mistakes. Your feedback is appreciated, and will help us make improvement over time. The PoC was run in a VM and it seemed to be legit - if not, let us know and we can strengthen our checker. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
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 a signed integer overflow when doubling the assembler buffer size using 32-bit int arithmetic, which wraps to a negative value and bypasses the out-of-memory check.
Impact
An attacker could potentially achieve arbitrary code execution by exploiting the overflow with concurrent heap spraying, though the gigantic MemMove will eventually crash upon hitting an unmapped guard page.
What the attacker needed
Ability to run JavaScript in V8; large function to trigger overflow; concurrent Web Worker for exploitation
The fix
The fix should use checked math (size_t or base::CheckedNumeric<int>) in Assembler::GrowBuffer and add an explicit guard in BaselineCompiler::AllocateBuffer to ensure the initial estimated size does not exceed kMaximalBufferSize.
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. When it compiles large functions, it calculates how much memory to allocate. A bug causes that calculation to go wrong, making the engine think it needs a tiny amount of memory when it actually needs a huge amount, so it writes far beyond the allocated space. This can let an attacker run their own code on the machine.
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.