Skip to content
Memory corruption Advisory Advanced CVE-2025-0612

Out of bounds memory access in V8 (CVE-2025-0612)

A memory corruption bug in V8's garbage collector causes out-of-bounds writes and reads, leading to crashes. An attacker could potentially exploit this to execute arbitrary code or cause denial of service.

Alan Goodman Follow

Originally disclosed on Chrome VRP

Bounty$8,000 High View original
  • Fix shipped in 34 days

VULNERABILITY DETAILS

Fatal error in ../../src/compiler/verifier.cc, line 611

Check failed: func_info->parameter_count() == StateValuesAccess(state.parameters()).size() (0 vs. 65536). (This is what happens in an ASAN build with dchecks enabled)

==908705==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x1718ff846454 (pc 0x7ffff7d98ac3 bp 0x7fffffffb480 sp 0x7fffffffb408 T908705) ==908705==The signal is caused by a WRITE memory access. (To me this one looks like a wild write)

==909193==ERROR: AddressSanitizer: negative-size-param: (size=-7171516) Address 0x7abe00a0b900 is a wild pointer inside of access range of size 0x000000000001. SUMMARY: AddressSanitizer: negative-size-param src/utils/memcopy.h in MemCopy

==910208==ERROR: AddressSanitizer: SEGV on unknown address 0x00000008e67c (pc 0x7ffff1f77afe bp 0x7fffffffd3f0 sp 0x7fffffffd340 T0) ==910208==The signal is caused by a READ memory access. SUMMARY: AddressSanitizer: SEGV third_party/libc++/src/include/__atomic/support/c11.h:75:10 in __cxx_atomic_load<int>

VERSION V8 a770bc7cd104cce1d4ae8f6443d79fb9b3434a91 Operating System: Ubuntu 24.04

BISECT I stopped bisecting when I got to 6 months old. Its segfaulting in a release build of d46b1d8f105d674d9bdabff56cb6c3a18bd50095

2024-12-20T11:11:44.222126+00:00 dl360p10fuzz kernel: d8[924282]: segfault at 23e3ffe5e64c ip 00007ffff7d98ac3 sp 00007fffffffc278 error 6 in libc.so.6[7ffff7c28000+188000] likely on CPU 9 (core 10, socket 0) 2024-12-20T11:11:44.222155+00:00 dl360p10fuzz kernel: Code: 66 03 48 83 ee 80 62 e1 fd 28 7f 0f 62 e1 fd 28 7f 57 01 62 e1 fd 28 7f 5f 02 62 e1 fd 28 7f 67 03 48 83 ef 80 48 39 fa 77 bd <62> e1 fe 28 7f 6a 03 62 e1 fe 28 7f 72 02 62 e1 fe 28 7f 7a 01 62

MY ANALYSIS I think this might be related to https://issues.chromium.org/issues/344664770 however I've ran out of skills trying to get to the bottom of it (surprise surprise). In my fuzzer build (which is as close as I can get for an instrumented binary to a release build, running in a modified version of fuzzilli) I get what looks like a wild write. So then I try in an ASAN build and get a 'harmless' Check failed. If I remove that check from the code (since release builds dont run checks) then ASAN build tends to blow up with wild read or negative size param. I believe something is going terribly wrong in garbage collection, a lot of the test cases are triggering OOM condition. Checking with release builds the SEGV looks most like the wild write I am getting in my fuzzilli build.

REPRODUCTION CASE (Attached) I've got a huge pile of crashers which all appear to be the same issue. The attached one happens to be one of those fuzzilli testcases that appear to be placed into some kind of larger framework file which I honestly do not understand. Therefore I've not tried to minimize it yet. I will add a minimized repro if I can create one that makes sense to me.

FOR CRASHES, PLEASE INCLUDE THE FOLLOWING ADDITIONAL INFORMATION Type of crash: SEGV read/write / Check Failed

./d8 --expose-gc --expose-externalize-string --omit-quit --allow-natives-syntax --fuzzing --jit-fuzzing --future --harmony --js-staging --wasm-staging --disable-in-process-stack-traces ~/fuzzilli_corpus/crashes/program_20241220024106_E23EB080-4FC2-4AF7-9394-F33E868748A2_flaky.js [COV] no shared memory bitmap available, skipping [COV] edge counters initialized. Shared memory: (null) with 878562 edges UndefinedBehaviorSanitizer:DEADLYSIGNAL ==936268==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x169aff84594c (pc 0x7ffff7d98ac3 bp 0x7fffffffb550 sp 0x7fffffffb4d8 T936268) ==936268==The signal is caused by a WRITE memory access. #0 0x7ffff7d98ac3 in __memcpy_evex_unaligned_erms string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:496 #1 0x555556e2670e in heap::base::SlotCallbackResult v8::internal::Scavenger::ScavengeObjectv8::internal::CompressedHeapObjectSlot(v8::internal::CompressedHeapObjectSlot, v8::internal::Taggedv8::internal::HeapObject) (/home/alan/v8/v8/out/fuzzilli/d8+0x18d270e) (BuildId: 787711c61a56e1db) #2 0x555556dfdc2b in v8::internal::Scavenger::Process(v8::JobDelegate*) (/home/alan/v8/v8/out/fuzzilli/d8+0x18a9c2b) (BuildId: 787711c61a56e1db) #3 0x555556def28b in v8::internal::ScavengerCollector::JobTask::ProcessItems(v8::JobDelegate*, v8::internal::Scavenger*) (/home/alan/v8/v8/out/fuzzilli/d8+0x189b28b) (BuildId: 787711c61a56e1db) #4 0x555556deeaa9 in v8::internal::ScavengerCollector::JobTask::Run(v8::JobDelegate*) (/home/alan/v8/v8/out/fuzzilli/d8+0x189aaa9) (BuildId: 787711c61a56e1db) #5 0x555558e337bd in v8::platform::DefaultJobState::Join() (/home/alan/v8/v8/out/fuzzilli/d8+0x38df7bd) (BuildId: 787711c61a56e1db) #6 0x555558e33e4e in v8::platform::DefaultJobHandle::Join() (/home/alan/v8/v8/out/fuzzilli/d8+0x38dfe4e) (BuildId: 787711c61a56e1db) #7 0x555556e0217e in v8::internal::ScavengerCollector::CollectGarbage() (/home/alan/v8/v8/out/fuzzilli/d8+0x18ae17e) (BuildId: 787711c61a56e1db) #8 0x555556cf647b in v8::internal::Heap::Scavenge() (/home/alan/v8/v8/out/fuzzilli/d8+0x17a247b) (BuildId: 787711c61a56e1db) #9 0x555556cf493f in v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) (/home/alan/v8/v8/out/fuzzilli/d8+0x17a093f) (BuildId: 787711c61a56e1db) #10 0x555556d1bf68 in v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1::operator()() const heap.cc #11 0x555556d1b995 in void heap::base::Stack::SetMarkerAndCallbackImpl<v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1>(heap::base::Stack*, void*, void const*) heap.cc #12 0x555557ce51a6 in PushAllRegistersAndIterateStack push_registers_asm.cc

==936268==Register values: rax = 0x0000169b000aca18 rbx = 0x0000555559b51f90 rcx = 0x0000169b000aca18 rdx = 0x0000169aff8458ec
rdi = 0x0000169b000acaa0 rsi = 0x0000169b00913b38 rbp = 0x00007fffffffb550 rsp = 0x00007fffffffb4d8
r8 = 0x0000169b000aca18 r9 = 0x0000000000000030 r10 = 0x0000000000000001 r11 = 0x00000000013c0000
r12 = 0x0000169b00913aad r13 = 0x00000000ff798f58 r14 = 0x0000000000000565 r15 = 0x0000169b00000565
UndefinedBehaviorSanitizer can not provide additional info. SUMMARY: UndefinedBehaviorSanitizer: SEGV string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:496 in __memcpy_evex_unaligned_erms ==936268==ABORTING

RANDOM ADENDUM To create my release mode binaries I ran what looked to be a helpful script: tools/dev/gm.py x64.release. Glancing through the script it didnt look like it was going to break my v8 tree but after running it; all my other builds in ./out are 'cleaned' - eg wiped out. This has really thrown a spanner in trying to complete this report. Hopefully if I erase my v8 directory and check out a new copy this weirdness goes away but this is super frustrating +++ because its not clear from reading the script that its gonna do this and it doesnt anywhere mention running it could cause data loss in your output folder.

CREDIT INFORMATION Externally reported security bugs may appear in Chrome release notes. If this bug is included, how would you like to be credited? Reporter credit: Alan Goodman

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

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 7 min read.

Context

This is a V8 bug, reported through the Chrome VRP and tracked as CVE-2025-0612, an out of bounds memory access in the JavaScript engine. The report is an advisory style write-up: the researcher found a crash in a fuzzing build of V8, could not fully explain it, and documented the different ways the same input fails across build configurations. The target is the d8 shell built from V8 at commit [redacted], running on Ubuntu 24.04.

Setup

The researcher was fuzzing V8 with a modified version of Fuzzilli. Two kinds of build matter here:

  1. A fuzzer build, described as as close as possible to a release build while still being instrumented, running under Fuzzilli.
  2. An ASAN build with dchecks enabled, which is where the first, apparently harmless, failure appears.

A release build was also produced, using the script tools/dev/gm.py x64.release. The report notes that running this script wiped the other builds in ./out, which disrupted the work.

The reproduction command is:

Bash
./d8 --expose-gc --expose-externalize-string --omit-quit --allow-natives-syntax --fuzzing --jit-fuzzing --future --harmony --js-staging --wasm-staging --disable-in-process-stack-traces ~/fuzzilli_corpus/crashes/program_20241220024106_E23EB080-4FC2-4AF7-9394-F33E868748A2_flaky.js

The flags enable garbage collection control, string externalisation, native syntax access and the fuzzing and staging feature sets. The input is a Fuzzilli testcase, which the researcher describes as embedded in a larger framework file that they did not understand, so it was not minimised at the time of reporting.

Finding it

The researcher had a large pile of crashers that all appeared to be the same issue. The first symptom, in the ASAN build with dchecks enabled, is a verifier failure:

Text
# Fatal error in ../../src/compiler/verifier.cc, line 611
# Check failed: func_info->parameter_count() == StateValuesAccess(state.parameters()).size() (0 vs. 65536). (This is what happens in an ASAN build with dchecks enabled)

The mismatch is between a parameter count of 0 and a state values size of 65536.

Removing that check, since release builds do not run checks, changes the picture. The ASAN build then tends to fail in one of two ways:

Text
==909193==ERROR: AddressSanitizer: negative-size-param: (size=-7171516)
Address 0x7abe00a0b900 is a wild pointer inside of access range of size 0x000000000001.
SUMMARY: AddressSanitizer: negative-size-param src/utils/memcopy.h in MemCopy
Text
==910208==ERROR: AddressSanitizer: SEGV on unknown address 0x00000008e67c (pc 0x7ffff1f77afe bp 0x7fffffffd3f0 sp 0x7fffffffd340 T0)
==910208==The signal is caused by a READ memory access.
SUMMARY: AddressSanitizer: SEGV third_party/libc++/src/include/__atomic/support/c11.h:75:10 in __cxx_atomic_load<int>

In the fuzzer build the researcher sees what looks like a wild write:

Text
==908705==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x1718ff846454 (pc 0x7ffff7d98ac3 bp 0x7fffffffb480 sp 0x7fffffffb408 T908705)
==908705==The signal is caused by a WRITE memory access. (To me this one looks like a wild write)

The researcher's own reading is that something is going badly wrong in garbage collection, since many of the test cases trigger out of memory conditions. They also suspected a link to a previously filed Chromium issue, but ran out of ideas trying to confirm it.

Exploitation

Step 1: run the testcase in the fuzzer build

Running the command above produces the following output:

Text
[COV] no shared memory bitmap available, skipping
[COV] edge counters initialized. Shared memory: (null) with 878562 edges
UndefinedBehaviorSanitizer:DEADLYSIGNAL
==936268==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x169aff84594c (pc 0x7ffff7d98ac3 bp 0x7fffffffb550 sp 0x7fffffffb4d8 T936268)
==936268==The signal is caused by a WRITE memory access.
    #0 0x7ffff7d98ac3 in __memcpy_evex_unaligned_erms string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:496
    #1 0x555556e2670e in heap::base::SlotCallbackResult v8::internal::Scavenger::ScavengeObject<v8::internal::CompressedHeapObjectSlot>(v8::internal::CompressedHeapObjectSlot, v8::internal::Tagged<v8::internal::HeapObject>) (/home/alan/v8/v8/out/fuzzilli/d8+0x18d270e) (BuildId: 787711c61a56e1db)
    #2 0x555556dfdc2b in v8::internal::Scavenger::Process(v8::JobDelegate*) (/home/alan/v8/v8/out/fuzzilli/d8+0x18a9c2b) (BuildId: 787711c61a56e1db)
    #3 0x555556def28b in v8::internal::ScavengerCollector::JobTask::ProcessItems(v8::JobDelegate*, v8::internal::Scavenger*) (/home/alan/v8/v8/out/fuzzilli/d8+0x189b28b) (BuildId: 787711c61a56e1db)
    #4 0x555556deeaa9 in v8::internal::ScavengerCollector::JobTask::Run(v8::JobDelegate*) (/home/alan/v8/v8/out/fuzzilli/d8+0x189aaa9) (BuildId: 787711c61a56e1db)
    #5 0x555558e337bd in v8::platform::DefaultJobState::Join() (/home/alan/v8/v8/out/fuzzilli/d8+0x38df7bd) (BuildId: 787711c61a56e1db)
    #6 0x555558e33e4e in v8::platform::DefaultJobHandle::Join() (/home/alan/v8/v8/out/fuzzilli/d8+0x38dfe4e) (BuildId: 787711c61a56e1db)
    #7 0x555556e0217e in v8::internal::ScavengerCollector::CollectGarbage() (/home/alan/v8/v8/out/fuzzilli/d8+0x18ae17e) (BuildId: 787711c61a56e1db)
    #8 0x555556cf647b in v8::internal::Heap::Scavenge() (/home/alan/v8/v8/out/fuzzilli/d8+0x17a247b) (BuildId: 787711c61a56e1db)
    #9 0x555556cf493f in v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) (/home/alan/v8/v8/out/fuzzilli/d8+0x17a093f) (BuildId: 787711c61a56e1db)
    #10 0x555556d1bf68 in v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1::operator()() const heap.cc
    #11 0x555556d1b995 in void heap::base::Stack::SetMarkerAndCallbackImpl<v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1>(heap::base::Stack*, void*, void const*) heap.cc
    #12 0x555557ce51a6 in PushAllRegistersAndIterateStack push_registers_asm.cc

==936268==Register values:
rax = 0x0000169b000aca18  rbx = 0x0000555559b51f90  rcx = 0x0000169b000aca18  rdx = 0x0000169aff8458ec
rdi = 0x0000169b000acaa0  rsi = 0x0000169b00913b38  rbp = 0x00007fffffffb550  rsp = 0x00007fffffffb4d8
 r8 = 0x0000169b000aca18   r9 = 0x0000000000000030  r10 = 0x0000000000000001  r11 = 0x00000000013c0000
r12 = 0x0000169b00913aad  r13 = 0x00000000ff798f58  r14 = 0x0000000000000565  r15 = 0x0000169b00000565
UndefinedBehaviorSanitizer can not provide additional info.
SUMMARY: UndefinedBehaviorSanitizer: SEGV string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:496 in __memcpy_evex_unaligned_erms
==936268==ABORTING

The stack is the important part. The faulting write happens inside __memcpy_evex_unaligned_erms, called from Scavenger::ScavengeObject while the scavenger is processing objects during a young generation garbage collection. The crash is therefore inside the GC, not in the JavaScript code itself, which is consistent with the researcher's suspicion that garbage collection is where things go wrong.

Step 2: compare across build types

The same input behaves differently depending on instrumentation:

Build Observed failure
ASAN with dchecks Verifier check failure, parameter count 0 vs 65536
ASAN, check removed Negative size parameter in MemCopy, or SEGV on a read in an atomic load
Fuzzer build SEGV on a write inside __memcpy_evex_unaligned_erms from the scavenger
Release SEGV that most resembles the wild write from the fuzzer build

Step 3: bisect

The researcher bisected until they reached a build six months old, which still segfaults in a release build of [redacted]. The kernel log from one of the crashes reads:

Text
2024-12-20T11:11:44.222126+00:00 dl360p10fuzz kernel: d8[924282]: segfault at 23e3ffe5e64c ip 00007ffff7d98ac3 sp 00007fffffffc278 error 6 in libc.so.6[7ffff7c28000+188000] likely on CPU 9 (core 10, socket 0)
2024-12-20T11:11:44.222155+00:00 dl360p10fuzz kernel: Code: 66 03 48 83 ee 80 62 e1 fd 28 7f 0f 62 e1 fd 28 7f 57 01 62 e1 fd 28 7f 5f 02 62 e1 fd 28 7f 67 03 48 83 ef 80 48 39 fa 77 bd <62> e1 fe 28 7f 6a 03 62 e1 fe 28 7f 72 02 62 e1 fe 28 7f 7a 01 62

Root cause

The report does not identify the underlying defect. What it establishes is the shape of the failure: a write out of bounds during scavenging, a corrupted compiler state visible as a parameter count mismatch in the verifier, and a negative size passed to MemCopy once the verifier check is removed. The researcher's hypothesis is that something goes wrong in garbage collection, with many test cases triggering out of memory conditions, but this is stated as a belief rather than a confirmed cause. The report also suggests a possible relation to an earlier Chromium issue without confirming it.

Impact

An out of bounds write in the V8 heap during garbage collection is memory corruption in the engine that runs JavaScript. The report does not demonstrate a working exploit or describe a path from the crash to code execution in a browser. What it shows is a crash with a write fault inside the scavenger, which the researcher reads as a wild write. The severity recorded for the issue is high.

Fix

The report does not describe the fix. It is an advisory style disclosure of the crash and the researcher's analysis, not a patch write-up.

Variants to test

  1. Run the same testcase under different sanitizer and check configurations. A verifier check failure that turns into a wild write once the check is removed is a sign the check is masking corruption rather than catching a benign inconsistency.
  2. Look for GC related crashes where the faulting frame is inside the scavenger or marker rather than in generated code. A write fault inside memcpy called from ScavengeObject points at heap corruption rather than a JavaScript level bug.
  3. Watch for out of memory conditions in the testcase. If many inputs that trigger OOM also crash, the allocation failure path is worth examining.
  4. Bisect with release builds, not only instrumented ones, since the report shows the release build is where the wild write is most visible.
  5. Check whether removing a debug only check changes the failure mode. If it does, treat the check failure as a symptom and keep investigating.

Hunting notes

This kind of bug hides in engine internals rather than in web facing endpoints. The signals are crashes in the garbage collector, verifier failures that mention implausible counts, and sanitizer reports of negative sizes or wild pointers. Fuzzing with a corpus that produces large numbers of crashers helps, because grouping them by stack shape shows when many inputs are hitting one defect. The report itself does not describe how impact was demonstrated beyond the crash.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 16 min read.

What happened, in plain words

A security researcher named Alan Goodman was testing V8, the part of Google Chrome that reads and runs JavaScript, the programming language most websites use. He was using a fuzzer, a program that automatically generates huge numbers of strange JavaScript files and feeds them to the engine to see if any of them make it crash. One of those generated files did crash V8, and the researcher describes the failure as looking like a wild write.

That kind of mistake is called an out of bounds memory access. Think of memory as a long row of numbered lockers, and a program as someone allowed to use only the lockers assigned to them. An out of bounds write is that person stuffing a parcel into a locker that belongs to someone else, overwriting whatever was there. In a browser engine this is serious, because the data being overwritten might be another program's instructions or a security check.

The researcher could not pin down the exact underlying defect. What he could do was show that the same input fails in different ways depending on how V8 was built, and he suspected the problem was in garbage collection. The bug was tracked as CVE-2025-0612, rated high severity, and paid a bounty of 8,000 USD through the Chrome Vulnerability Reward Program. It was disclosed on 22 January 2025.

Background: the pieces involved

Before the crash details make sense, a few terms need unpacking.

V8 is the JavaScript engine inside Chrome. A browser engine is the component that turns the text of a web page and its scripts into something the computer actually does. When you load a page with JavaScript on it, V8 is the part chewing through that script.

d8 is a small command line program that ships with V8 for testing. Instead of opening a browser, you run d8 on a JavaScript file and it executes it directly. Developers use it because it is much faster to test the engine on its own than through the whole browser.

Fuzzing is automated guessing. A fuzzer produces random or semi random inputs, runs them, and watches for crashes. Fuzzilli is a fuzzer built specifically for JavaScript engines: rather than random text, it generates syntactically valid JavaScript programs, often weird ones, to reach deep code paths.

Garbage collection (GC) is how the engine frees memory it no longer needs. JavaScript programmers do not manually delete objects; the engine notices when an object can no longer be reached and reclaims its space. V8 splits this work: a "scavenger" handles the young generation, meaning recently created objects, copying the ones still alive into a new area and discarding the rest. If the scavenger miscounts or misreads an object, it can copy data to the wrong place, which is exactly the kind of wild write seen here.

Sanitizers are debugging tools added to a build of a program. ASAN (AddressSanitizer) watches every memory access and shouts when one goes out of bounds. UBSAN (UndefinedBehaviorSanitizer) watches for operations that are undefined in the language, such as certain invalid memory accesses. A build is a compiled version of the program; you can compile the same source code with different settings, and the sanitizer builds are slower but far more talkative when something goes wrong.

dchecks are debug checks, assertions compiled into debug builds that verify internal assumptions. Release builds, the ones users actually run, leave them out for speed. This matters later: a check can catch a problem early, and removing it lets the corruption run further.

Bisecting is a way of finding when a bug was introduced. You have a version that crashes and an older version that does not; you test the version halfway between them, then halfway again, and so on, halving the range each time until you find the change that introduced the fault.

A commit is a saved snapshot of the source code, identified by a long hexadecimal string. The report names two: [redacted], the version under test, and [redacted], an older one that still crashed.

The setup

The researcher was fuzzing V8 with a modified version of Fuzzilli. Two build types are central to the story:

  1. A fuzzer build, described as as close as possible to a release build while still being instrumented, running under Fuzzilli.
  2. An ASAN build with dchecks enabled, where the first, apparently harmless, failure appears.

He also produced a release build using a V8 helper script, tools/dev/gm.py x64.release. Running that script wiped the other builds in the ./out folder, which disrupted the work. The report notes this because it made finishing the investigation harder, not because it is part of the bug.

The command used to reproduce the crash is:

Bash
./d8 --expose-gc --expose-externalize-string --omit-quit --allow-natives-syntax --fuzzing --jit-fuzzing --future --harmony --js-staging --wasm-staging --disable-in-process-stack-traces ~/fuzzilli_corpus/crashes/program_20241220024106_E23EB080-4FC2-4AF7-9394-F33E868748A2_flaky.js

Line by line:

  • ./d8 runs the d8 shell from the current directory.
  • --expose-gc makes the garbage collector callable from JavaScript, so a test can force a collection at a chosen moment.
  • --expose-externalize-string exposes a V8 feature for moving string data outside the normal heap, useful for stressing memory handling.
  • --omit-quit stops the quit() function from ending the process, so a test cannot simply exit early.
  • --allow-natives-syntax lets the script call internal V8 functions that ordinary JavaScript cannot reach, which is how fuzzers poke at engine internals.
  • --fuzzing and --jit-fuzzing switch on behaviour intended for fuzzing, including extra randomness in the just in time compiler, the part that turns JavaScript into fast machine code.
  • --future, --harmony, --js-staging and --wasm-staging enable experimental language features that are not yet on by default, widening the surface the fuzzer can reach.
  • --disable-in-process-stack-traces turns off in process stack trace collection, which keeps crash output cleaner.
  • The final argument is the input file: a Fuzzilli testcase from the crash corpus. The researcher describes it as embedded in a larger framework file that he did not understand, so it had not been minimised, meaning reduced to the smallest input that still crashes.

Finding it

The researcher had a large pile of crashers that all appeared to be the same issue. The first symptom, in the ASAN build with dchecks enabled, is a verifier failure:

Text
# Fatal error in ../../src/compiler/verifier.cc, line 611
# Check failed: func_info->parameter_count() == StateValuesAccess(state.parameters()).size() (0 vs. 65536). (This is what happens in an ASAN build with dchecks enabled)

This is a check inside the compiler, the part of V8 that optimises JavaScript into faster code. The check compares two numbers that should match: how many parameters a function is recorded as having, and how many parameter values the compiler's internal state actually holds. It found 0 on one side and 65536 on the other. The check found 0 on one side and 65536 on the other. The verifier is like a proofreader who notices a sentence that makes no grammatical sense: the sentence itself is the symptom, the real problem is whatever corrupted the text.

Removing that check, since release builds do not run checks, changes the picture. The ASAN build then tends to fail in one of two ways:

Text
==909193==ERROR: AddressSanitizer: negative-size-param: (size=-7171516)
Address 0x7abe00a0b900 is a wild pointer inside of access range of size 0x000000000001.
SUMMARY: AddressSanitizer: negative-size-param src/utils/memcopy.h in MemCopy

Here a memory copy routine, MemCopy, was asked to copy a negative number of bytes. A size cannot be negative, so the value passed to the copy routine is not a valid length. The address it was given is described as a wild pointer, meaning an address that does not point at any valid object. Copying with a nonsense length from a nonsense address is how a small corruption turns into a large one.

Text
==910208==ERROR: AddressSanitizer: SEGV on unknown address 0x00000008e67c (pc 0x7ffff1f77afe bp 0x7fffffffd3f0 sp 0x7fffffffd340 T0)
==910208==The signal is caused by a READ memory access.
SUMMARY: AddressSanitizer: SEGV third_party/libc++/src/include/__atomic/support/c11.h:75:10 in __cxx_atomic_load<int>

This one is a SEGV, short for segmentation fault: the processor was told to read from an address it is not allowed to read, and the operating system stopped the program. The read happened inside an atomic load, a low level operation that reads a value in a way that is safe when several threads run at once. Reading an integer should never fault, so again the address being used must be garbage.

In the fuzzer build the researcher sees what looks like a wild write:

Text
==908705==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x1718ff846454 (pc 0x7ffff7d98ac3 bp 0x7fffffffb480 sp 0x7fffffffb408 T908705)
==908705==The signal is caused by a WRITE memory access. (To me this one looks like a wild write)

A write fault is worse than a read fault. Reading the wrong memory might leak data or crash; writing to the wrong memory destroys whatever was there. The researcher's own reading is that something is going badly wrong in garbage collection, since many of the test cases trigger out of memory conditions, meaning the engine runs out of space and has to collect aggressively. He also suspected a link to a previously filed Chromium issue, but ran out of ideas trying to confirm it.

Reproducing it step by step

Step 1: run the testcase in the fuzzer build

Running the command above produces the following output:

Text
[COV] no shared memory bitmap available, skipping
[COV] edge counters initialized. Shared memory: (null) with 878562 edges
UndefinedBehaviorSanitizer:DEADLYSIGNAL
==936268==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x169aff84594c (pc 0x7ffff7d98ac3 bp 0x7fffffffb550 sp 0x7fffffffb4d8 T936268)
==936268==The signal is caused by a WRITE memory access.
    #0 0x7ffff7d98ac3 in __memcpy_evex_unaligned_erms string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:496
    #1 0x555556e2670e in heap::base::SlotCallbackResult v8::internal::Scavenger::ScavengeObject<v8::internal::CompressedHeapObjectSlot>(v8::internal::CompressedHeapObjectSlot, v8::internal::Tagged<v8::internal::HeapObject>) (/home/alan/v8/v8/out/fuzzilli/d8+0x18d270e) (BuildId: 787711c61a56e1db)
    #2 0x555556dfdc2b in v8::internal::Scavenger::Process(v8::JobDelegate*) (/home/alan/v8/v8/out/fuzzilli/d8+0x18a9c2b) (BuildId: 787711c61a56e1db)
    #3 0x555556def28b in v8::internal::ScavengerCollector::JobTask::ProcessItems(v8::JobDelegate*, v8::internal::Scavenger*) (/home/alan/v8/v8/out/fuzzilli/d8+0x189b28b) (BuildId: 787711c61a56e1db)
    #4 0x555556deeaa9 in v8::internal::ScavengerCollector::JobTask::Run(v8::JobDelegate*) (/home/alan/v8/v8/out/fuzzilli/d8+0x189aaa9) (BuildId: 787711c61a56e1db)
    #5 0x555558e337bd in v8::platform::DefaultJobState::Join() (/home/alan/v8/v8/out/fuzzilli/d8+0x38df7bd) (BuildId: 787711c61a56e1db)
    #6 0x555558e33e4e in v8::platform::DefaultJobHandle::Join() (/home/alan/v8/v8/out/fuzzilli/d8+0x38dfe4e) (BuildId: 787711c61a56e1db)
    #7 0x555556e0217e in v8::internal::ScavengerCollector::CollectGarbage() (/home/alan/v8/v8/out/fuzzilli/d8+0x18ae17e) (BuildId: 787711c61a56e1db)
    #8 0x555556cf647b in v8::internal::Heap::Scavenge() (/home/alan/v8/v8/out/fuzzilli/d8+0x17a247b) (BuildId: 787711c61a56e1db)
    #9 0x555556cf493f in v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) (/home/alan/v8/v8/out/fuzzilli/d8+0x17a093f) (BuildId: 787711c61a56e1db)
    #10 0x555556d1bf68 in v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1::operator()() const heap.cc
    #11 0x555556d1b995 in void heap::base::Stack::SetMarkerAndCallbackImpl<v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1>(heap::base::Stack*, void*, void const*) heap.cc
    #12 0x555557ce51a6 in PushAllRegistersAndIterateStack push_registers_asm.cc

==936268==Register values:
rax = 0x0000169b000aca18  rbx = 0x0000555559b51f90  rcx = 0x0000169b000aca18  rdx = 0x0000169aff8458ec
rdi = 0x0000169b000acaa0  rsi = 0x0000169b00913b38  rbp = 0x00007fffffffb550  rsp = 0x00007fffffffb4d8
 r8 = 0x0000169b000aca18   r9 = 0x0000000000000030  r10 = 0x0000000000000001  r11 = 0x00000000013c0000
r12 = 0x0000169b00913aad  r13 = 0x00000000ff798f58  r14 = 0x0000000000000565  r15 = 0x0000169b00000565
UndefinedBehaviorSanitizer can not provide additional info.
SUMMARY: UndefinedBehaviorSanitizer: SEGV string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:496 in __memcpy_evex_unaligned_erms
==936268==ABORTING

What each part means:

  • The [COV] lines are coverage instrumentation, a fuzzing feature that records which parts of the code were executed. It reports 878,562 edges, meaning code paths, were tracked. This is bookkeeping, not the bug.
  • UndefinedBehaviorSanitizer:DEADLYSIGNAL and the SEGV line say the program received a fatal signal, a segmentation fault, at an address the sanitizer calls unknown.
  • The signal is caused by a WRITE memory access tells us the fault was a write, not a read.
  • The numbered lines are the call stack, the list of functions that were running when the crash happened, with the most recent call first. Frame #0 is __memcpy_evex_unaligned_erms, a fast memory copy routine from the system C library. Frame #1 is Scavenger::ScavengeObject, the garbage collector's routine for copying a live object during scavenging. Frames #2 to #4 are the scavenger's worker machinery, #5 and #6 are the job system joining a worker thread, and #7 to #9 are the heap starting a scavenge and a full garbage collection. Frames #10 to #12 show the collection being triggered from a stack walk.
  • The register values are the contents of the processor's registers at the moment of the crash. They are useful to an engineer debugging the crash, but the report does not interpret them.
  • The final SUMMARY repeats the faulting function, and ABORTING says the process gave up.

The stack is the important part. The faulting write happens inside __memcpy_evex_unaligned_erms, called from Scavenger::ScavengeObject while the scavenger is processing objects during a young generation garbage collection. The crash is therefore inside the GC, not in the JavaScript code itself, which is consistent with the researcher's suspicion that garbage collection is where things go wrong. In everyday terms: the fault is not in the recipe the script gave the engine, it is in the kitchen hand who was tidying up afterwards.

Step 2: compare across build types

The same input behaves differently depending on instrumentation:

Build Observed failure
ASAN with dchecks Verifier check failure, parameter count 0 vs 65536
ASAN, check removed Negative size parameter in MemCopy, or SEGV on a read in an atomic load
Fuzzer build SEGV on a write inside __memcpy_evex_unaligned_erms from the scavenger
Release SEGV that most resembles the wild write from the fuzzer build

This comparison is the heart of the report. The same corrupted state surfaces at different points depending on which safety nets are present. With the debug check in place, the program stops early, at the first sign of nonsense. Remove the net, and the corruption travels further until it hits something that cannot survive it, such as a memory copy with a negative length. The release build, which has no nets at all, shows the raw wild write. The lesson for anyone reading crash reports: a check failure is often the first visible symptom of corruption that started earlier, not the bug itself.

Step 3: bisect

The researcher bisected until he reached a build six months old, which still segfaults in a release build of [redacted]. In other words, the crash was still present in a build six months old. The kernel log from one of the crashes reads:

Text
2024-12-20T11:11:44.222126+00:00 dl360p10fuzz kernel: d8[924282]: segfault at 23e3ffe5e64c ip 00007ffff7d98ac3 sp 00007fffffffc278 error 6 in libc.so.6[7ffff7c28000+188000] likely on CPU 9 (core 10, socket 0)
2024-12-20T11:11:44.222155+00:00 dl360p10fuzz kernel: Code: 66 03 48 83 ee 80 62 e1 fd 28 7f 0f 62 e1 fd 28 7f 57 01 62 e1 fd 28 7f 5f 02 62 e1 fd 28 7f 67 03 48 83 ef 80 48 39 fa 77 bd <62> e1 fe 28 7f 6a 03 62 e1 fe 28 7f 72 02 62 e1 fe 28 7f 7a 01 62

This is the operating system's own record of the crash, written to the kernel log. The first line says the process d8 segfaulted at address 23e3ffe5e64c, with the instruction pointer at 00007ffff7d98ac3, inside the system C library libc.so.6.

Root cause

The report does not identify the underlying defect. What it establishes is the shape of the failure: a write out of bounds during scavenging, a corrupted compiler state visible as a parameter count mismatch in the verifier, and a negative size passed to MemCopy once the verifier check is removed. The researcher's hypothesis is that something goes wrong in garbage collection, with many test cases triggering out of memory conditions, but this is stated as a belief rather than a confirmed cause. The report also suggests a possible relation to an earlier Chromium issue without confirming it.

Impact

An out of bounds write in the V8 heap during garbage collection is memory corruption in the engine that runs JavaScript. The report does not demonstrate a working exploit or describe a path from the crash to code execution in a browser. What it shows is a crash with a write fault inside the scavenger, which the researcher reads as a wild write. The severity recorded for the issue is high.

Fix

The report does not describe the fix. It is an advisory style disclosure of the crash and the researcher's analysis, not a patch write-up.

Variants to test

  1. Run the same testcase under different sanitizer and check configurations. A verifier check failure that turns into a wild write once the check is removed is a sign the check is masking corruption rather than catching a benign inconsistency.
  2. Look for GC related crashes where the faulting frame is inside the scavenger or marker rather than in generated code. A write fault inside memcpy called from ScavengeObject points at heap corruption rather than a JavaScript level bug.
  3. Watch for out of memory conditions in the testcase. If many inputs that trigger OOM also crash, the allocation failure path is worth examining.
  4. Bisect with release builds, not only instrumented ones, since the report shows the release build is where the wild write is most visible.
  5. Check whether removing a debug only check changes the failure mode. If it does, treat the check failure as a symptom and keep investigating.

Hunting notes

This kind of bug hides in engine internals rather than in web facing endpoints. The signals are crashes in the garbage collector, verifier failures that mention implausible counts, and sanitizer reports of negative sizes or wild pointers. Fuzzing with a corpus that produces large numbers of crashers helps, because grouping them by stack shape shows when many inputs are hitting one defect. The report itself does not describe how impact was demonstrated beyond the crash.

Glossary

  • ASAN (AddressSanitizer): a debugging tool compiled into a program that detects invalid memory accesses, such as reads or writes outside an object's bounds.
  • Atomic load: a read of a value that is safe even when several threads access it at the same time.
  • Bisect: to narrow down the change that introduced a bug by testing versions halfway between a known good and a known bad one.
  • Build: a compiled version of a program produced with particular settings.
  • Chrome VRP (Vulnerability Reward Program): Google's scheme that pays researchers for reporting security bugs in Chrome.
  • Commit: a saved snapshot of source code, identified by a long hexadecimal string.
  • Compiler: the part of an engine that translates code into a faster form before running it.
  • Coverage instrumentation: extra code added to record which parts of a program were executed, used by fuzzers to guide their input generation.
  • CVE: a public identifier assigned to a known security vulnerability.
  • d8: a command line shell shipped with V8 for running JavaScript outside a browser.
  • dchecks: debug checks, assertions compiled into debug builds that verify internal assumptions and are left out of release builds.
  • Fuzzer: a program that automatically generates many inputs and runs them to find crashes.
  • Fuzzilli: a fuzzer designed specifically for JavaScript engines.
  • Garbage collection (GC): automatic reclamation of memory that a program no longer uses.
  • Heap: the area of memory where a program stores objects it creates at runtime.
  • JIT (just in time) compiler: a compiler that translates code to machine code while the program is running.
  • Kernel log: the operating system's record of system level events, including crashes.
  • libc: the standard C library on Linux, which provides routines such as memcpy.
  • memcpy: a standard routine that copies a block of memory from one place to another.
  • Minimise: to reduce a crashing input to the smallest version that still crashes.
  • Negative-size-param: an ASAN report saying a memory operation was given a negative length.
  • Out of bounds memory access: reading or writing memory outside the region a program is allowed to use.
  • Out of memory (OOM): a condition where a program cannot allocate more memory.
  • Register: a small, fast storage location inside the processor.
  • Release build: a compiled version with optimisations and without debug checks, as shipped to users.
  • Scavenger: the part of V8's garbage collector that handles recently created objects by copying live ones to a new area.
  • SEGV (segmentation fault): a fatal signal raised when a program accesses memory it is not permitted to access.
  • Stack (call stack): the list of functions currently running, from the most recent call to the outermost.
  • UBSAN (UndefinedBehaviorSanitizer): a debugging tool that detects operations with undefined behaviour, including some invalid memory accesses.
  • V8: the JavaScript engine used by Google Chrome.
  • Verifier: a component that checks internal consistency of the compiler's data.
  • Wild pointer: an address that does not point at any valid object.
  • Wild write: a write to an address that was never intended to be written.

More by Alan Goodman

View all

2 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.