Out of bounds memory access in V8 (CVE-2025-0998)
A debug check in V8's string handling failed when processing a crafted JavaScript input, indicating a potential out-of-bounds memory access. The reporter believes that in a non-debug build this could lead to out-of-bounds read or write, but this is not confirmed.
Originally disclosed on Chrome VRP
- Fix shipped in 44 days
VULNERABILITY DETAILS
Fatal error in ../../src/objects/string.h, line 156
Debug check failed: i < length_.
VERSION V8 ccb020dfa60e9b89597a0c953f94e800b3104213 Ubuntu 24.04
BISECT I bisected between ToT today and 405f64445837adf145e102f91103ab56f3957c4d (July 1st 2024) and it still replicated. I will try to do some more digging shortly.
MY ANALYSIS After looking through the code leading up to the dcheck I think the dcheck is performing a bounds check. Whilst the might of the fuzzer and myself combined didnt manage it; I believe that in a dcheckless build, violation of this dcheck might indicate that OOB read/write could be possible. Reported as security because I am not certain either way and dcheck is usually considered security unless proven otherwise.
REPRODUCTION CASE (manually reduced, inline below)
const v0 = /((((.).).).)/dyigm; function f1(a2, a3, a4) { a2.length; a3.d = a3; function f6(a7, a8, a9) { d8.test; this.timeZone = a2; const v14 = this.Intl; v14?.ListFormat; const v16 = v14.DateTimeFormat; let v17 = 1; const v22 = "number" + [-10,v17++]; let v24 = "2010-08-31T22:35:36+09:00"; v24 += "async"; const v27 = this.Intl.Locale; return v16(65536, this); } try { f6(); } catch (e) {} this.encodeURI(a3).replaceAll(v0, a3); } f1(f1, f1);
$ ./d8 ~/fuzzilli_corpus/expo_bulk/ilessthanlength_mod.js
Fatal error in ../../src/objects/string.h, line 156
Debug check failed: i < length_.
#FailureMessage Object: 0x7bfff5e47060 ==== C stack trace ===============================
./d8(__interceptor_backtrace+0x46) [0x555557724dd6]
./d8(+0x8e46823) [0x55555e39a823]
./d8(+0x8e44c2a) [0x55555e398c2a]
./d8(+0x8e18b20) [0x55555e36cb20]
./d8(+0x8e1803f) [0x55555e36c03f]
./d8(+0x3d3ca26) [0x555559290a26]
./d8(+0x3d3cd6b) [0x555559290d6b]
./d8(+0x3d398b1) [0x55555928d8b1]
./d8(+0x3d3b2ca) [0x55555928f2ca]
./d8(+0x266bd22) [0x555557bbfd22]
./d8(+0x266b0b0) [0x555557bbf0b0]
./d8(+0x8481d7d) [0x55555d9d5d7d]
Trace/breakpoint trap
is_debug = false is_asan=true dcheck_always_on=true v8_enable_slow_dchecks=true symbol_level = 2 v8_enable_slow_dchecks = true v8_optimized_debug = false
FOR CRASHES, PLEASE INCLUDE THE FOLLOWING ADDITIONAL INFORMATION Type of crash: Dcheck Crash State: #0 0x000055555e3902f0 in v8::base::OS::Abort()::$0::operator()() const (this=<optimized out>) at ../../src/base/platform/platform-posix.cc:730 #1 v8::base::OS::Abort () at ../../src/base/platform/platform-posix.cc:730 #2 0x000055555e36cb3c in V8_Fatal (file=<optimized out>, line=<optimized out>, format=0x5555570e3960 <str> "Debug check failed: %s.") at ../../src/base/logging.cc:215 #3 0x000055555e36c03f in v8::base::(anonymous namespace)::DefaultDcheckHandler (file=0x5555568c8be0 <str> "../../src/objects/string.h", line=156, message=0x5555568c8c20 <str> "i < length") at ../../src/base/logging.cc:59 #4 0x0000555559290a26 in v8::internal::String::FlatContent::Get (this=0x7bfff5a2a330, i=4) at ../../src/objects/string.h:156 #5 v8::internal::GetOffsetTimeZone (isolate=<optimized out>, time_zone=...) at ../../src/objects/js-date-time-format.cc:1692 #6 0x0000555559290d6b in v8::internal::JSDateTimeFormat::CreateTimeZone (isolate=<optimized out>, time_zone_string=...) at ../../src/objects/js-date-time-format.cc:1712 #7 0x000055555928d8b1 in v8::internal::JSDateTimeFormat::CreateDateTimeFormat (isolate=0x7f0ff6c21000, map=..., locales=..., input_options=..., required=<optimized out>, defaults=<optimized out>, service=<optimized out>) at ../../src/objects/js-date-time-format.cc:2352 #8 0x000055555928f2ca in v8::internal::JSDateTimeFormat::New (isolate=0x7bfff5800000, map=..., locales=..., input_options=..., service=<optimized out>) at ../../src/objects/js-date-time-format.cc:2171 #9 0x0000555557bbfd22 in v8::internal::(anonymous namespace)::LegacyFormatConstructorv8::internal::JSDateTimeFormat (args=..., isolate=0x7f0ff6c21000, feature=v8::Isolate::kDateTimeFormat, constructor=..., method_name=<optimized out>) at ../../src/builtins/builtins-intl.cc:265 #10 v8::internal::Builtin_Impl_DateTimeFormatConstructor (args=..., isolate=0x7f0ff6c21000) at ../../src/builtins/builtins-intl.cc:581 #11 0x0000555557bbf0b0 in v8::internal::Builtin_DateTimeFormatConstructor (args_length=7, args_object=<optimized out>, isolate=0x7f0ff6c21000) at ../../src/builtins/builtins-intl.cc:578 #12 0x000055555d9d5d7d in Builtins_CEntry_Return1_ArgvOnStack_BuiltinExit () #13 0x000055555d59edf2 in Builtins_InterpreterEntryTrampoline ()
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
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 an incorrect bounds check in V8's string handling when processing a time zone string, leading to an out-of-bounds access.
What the attacker needed
Ability to run JavaScript in V8
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 debug check is an internal test that stops the program if something unexpected happens. Here, a crafted JavaScript input caused such a check to fail, which might mean the program could read or write memory it shouldn't. The reporter isn't sure if this is actually exploitable in normal builds.
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.