Integer overflow in V8 (CVE-2025-6191)
An integer overflow in V8's regular expression handling causes a debug check failure when processing a crafted pattern. An attacker could potentially crash the engine or, in release builds, trigger memory corruption.
Originally disclosed on Chrome VRP
- Fix shipped in 22 days
VULNERABILITY DETAILS
#
# Fatal error in ..\..\src\objects\js-regexp.cc, line 234
# Debug check failed: escapes >= 0 (-2005397586 vs. 0).
#
#
#
#FailureMessage Object: 00000012179FD550
==== C stack trace ===============================
v8::base::debug::StackTrace::StackTrace [0x0x7fff2bb5b685+37] (D:\Browser\v8\v8\src\base\debug\stack_trace_win.cc:173)
v8::platform::`anonymous namespace'::PrintStackTrace [0x0x7fff2bcdab89+57] (D:\Browser\v8\v8\src\libplatform\default-platform.cc:28)
V8_Fatal [0x0x7fff2bb35463+323] (D:\Browser\v8\v8\src\base\logging.cc:214)
v8::base::`anonymous namespace'::DefaultDcheckHandler [0x0x7fff2bb34e8c+44] (D:\Browser\v8\v8\src\base\logging.cc:59)
V8_Dcheck [0x0x7fff2bb35571+81] (D:\Browser\v8\v8\src\base\logging.cc:228)
v8::internal::`anonymous namespace'::CountAdditionalEscapeChars<unsigned short> [0x0x7ffeaae0b824+740] (D:\Browser\v8\v8\src\objects\js-regexp.cc:234)
v8::internal::`anonymous namespace'::EscapeRegExpSource [0x0x7ffeaae08824+420] (D:\Browser\v8\v8\src\objects\js-regexp.cc:306)
v8::internal::JSRegExp::Initialize [0x0x7ffeaae07dfa+618] (D:\Browser\v8\v8\src\objects\js-regexp.cc:344)
v8::internal::JSRegExp::Initialize [0x0x7ffeaae08581+529] (D:\Browser\v8\v8\src\objects\js-regexp.cc:179)
v8::internal::__RT_impl_Runtime_RegExpInitializeAndCompile [0x0x7ffeab3fe615+549] (D:\Browser\v8\v8\src\runtime\runtime-regexp.cc:2147)
v8::internal::Runtime_RegExpInitializeAndCompile [0x0x7ffeab3fe10d+413] (D:\Browser\v8\v8\src\runtime\runtime-regexp.cc:2137)
Builtins_CEntry_Return1_ArgvOnStack_NoBuiltinExit [0x0x7ffeaf6b5b41+65]
Builtins_RegExpConstructor [0x0x7ffeaf5f40db+7579]
Builtins_InterpreterPushArgsThenFastConstructFunction [0x0x7ffeaf247501+1089]
Builtins_ConstructHandler [0x0x7ffeafe522c5+8261]
Builtins_InterpreterEntryTrampoline [0x0x7ffeaf2467f2+370]
Builtins_InterpreterEntryTrampoline [0x0x7ffeaf2467f2+370]
Builtins_JSEntryTrampoline [0x0x7ffeaf239ce7+103]
Builtins_JSEntry [0x0x7ffeaf23983f+255]
v8::internal::GeneratedCode<unsigned long long,unsigned long long,unsigned long long,unsigned long long,unsigned long long,long long,unsigned long long **>::Call [0x0x7ffea9f5438c+108] (D:\Browser\v8\v8\src\execution\simulator.h:212)
v8::internal::`anonymous namespace'::Invoke [0x0x7ffea9f503cd+5469] (D:\Browser\v8\v8\src\execution\execution.cc:441)
v8::internal::Execution::CallScript [0x0x7ffea9f50c61+513] (D:\Browser\v8\v8\src\execution\execution.cc:542)
v8::Script::Run [0x0x7ffea978b5cf+1135] (D:\Browser\v8\v8\src\api\api.cc:1964)
v8::Script::Run [0x0x7ffea978b148+120] (D:\Browser\v8\v8\src\api\api.cc:1929)
v8::Shell::ExecuteString [0x0x7ff6ae1d21b6+3142] (D:\Browser\v8\v8\src\d8\d8.cc:1030)
v8::SourceGroup::Execute [0x0x7ff6ae1f7e26+1174] (D:\Browser\v8\v8\src\d8\d8.cc:5073)
v8::Shell::RunMainIsolate [0x0x7ff6ae1ff287+631] (D:\Browser\v8\v8\src\d8\d8.cc:6027)
v8::Shell::RunMain [0x0x7ff6ae1feced+205] (D:\Browser\v8\v8\src\d8\d8.cc:5935)
v8::Shell::Main [0x0x7ff6ae201901+3873] (D:\Browser\v8\v8\src\d8\d8.cc:6801)
main [0x0x7ff6ae202333+35] (D:\Browser\v8\v8\src\d8\d8.cc:6893)
invoke_main [0x0x7ff6ae368489+57] (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79)
__scrt_common_main_seh [0x0x7ff6ae3685c2+306] (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
__scrt_common_main [0x0x7ff6ae36864e+14] (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331)
mainCRTStartup [0x0x7ff6ae36866e+14] (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17)
BaseThreadInitThunk [0x0x7fff6adfe8d7+23]
RtlUserThreadStart [0x0x7fff6cafc5dc+44]
VERSION
V8 version 13.9.0 (candidate)
REPRODUCTION CASE
Build: python3 tools/dev/gm.py x64.debug
Run: ./d8 poc.js
Reporter credit: Shaheen Fazim
What the report shows
The target is V8, the JavaScript engine used by Google Chrome, and the feature involved is regular expression handling, specifically the code that escapes a regular expression's source string. The researcher, Shaheen Fazim, reported an integer overflow that was tracked as CVE-2025-6191, rated high severity, and paid a bounty of 7,000 USD under the Chrome VRP. The report was disclosed on 17 June 2025.
The report is short and consists of a crash trace, a version, and a build and run instruction. The report gives a debug build command and a run command for a proof of concept script against the d8 shell. The trace shows a fatal error from a failed debug check.
The fatal error is reported at the top of the trace:
#
# Fatal error in ..\..\src\objects\js-regexp.cc, line 234
# Debug check failed: escapes >= 0 (-2005397586 vs. 0).
#
#
#
#FailureMessage Object: 00000012179FD550
The check that failed is escapes >= 0, and the value it saw was -2005397586.
The stack trace shows the path the engine took to get there. Reading from the bottom up, the script is executed by the d8 shell, the interpreter constructs a regular expression through Builtins_RegExpConstructor, and the runtime function Runtime_RegExpInitializeAndCompile calls into JSRegExp::Initialize. That in turn calls EscapeRegExpSource, which calls CountAdditionalEscapeChars<unsigned short>, and it is inside that function, at js-regexp.cc line 234, that the debug check fires. The full trace as given is:
==== C stack trace ===============================
v8::base::debug::StackTrace::StackTrace [0x0x7fff2bb5b685+37] (D:\Browser\v8\v8\src\base\debug\stack_trace_win.cc:173)
v8::platform::`anonymous namespace'::PrintStackTrace [0x0x7fff2bcdab89+57] (D:\Browser\v8\v8\src\libplatform\default-platform.cc:28)
V8_Fatal [0x0x7fff2bb35463+323] (D:\Browser\v8\v8\src\base\logging.cc:214)
v8::base::`anonymous namespace'::DefaultDcheckHandler [0x0x7fff2bb34e8c+44] (D:\Browser\v8\v8\src\base\logging.cc:59)
V8_Dcheck [0x0x7fff2bb35571+81] (D:\Browser\v8\v8\src\base\logging.cc:228)
v8::internal::`anonymous namespace'::CountAdditionalEscapeChars<unsigned short> [0x0x7ffeaae0b824+740] (D:\Browser\v8\v8\src\objects\js-regexp.cc:234)
v8::internal::`anonymous namespace'::EscapeRegExpSource [0x0x7ffeaae08824+420] (D:\Browser\v8\v8\src\objects\js-regexp.cc:306)
v8::internal::JSRegExp::Initialize [0x0x7ffeaae07dfa+618] (D:\Browser\v8\v8\src\objects\js-regexp.cc:344)
v8::internal::JSRegExp::Initialize [0x0x7ffeaae08581+529] (D:\Browser\v8\v8\src\objects\js-regexp.cc:179)
v8::internal::__RT_impl_Runtime_RegExpInitializeAndCompile [0x0x7ffeab3fe615+549] (D:\Browser\v8\v8\src\runtime\runtime-regexp.cc:2147)
v8::internal::Runtime_RegExpInitializeAndCompile [0x0x7ffeab3fe10d+413] (D:\Browser\v8\v8\src\runtime\runtime-regexp.cc:2137)
[redacted] [0x0x7ffeaf6b5b41+65]
Builtins_RegExpConstructor [0x0x7ffeaf5f40db+7579]
Builtins_InterpreterPushArgsThenFastConstructFunction [0x0x7ffeaf247501+1089]
Builtins_ConstructHandler [0x0x7ffeafe522c5+8261]
Builtins_InterpreterEntryTrampoline [0x0x7ffeaf2467f2+370]
Builtins_InterpreterEntryTrampoline [0x0x7ffeaf2467f2+370]
Builtins_JSEntryTrampoline [0x0x7ffeaf239ce7+103]
Builtins_JSEntry [0x0x7ffeaf23983f+255]
v8::internal::GeneratedCode<unsigned long long,unsigned long long,unsigned long long,unsigned long long,unsigned long long,long long,unsigned long long **>::Call [0x0x7ffea9f5438c+108] (D:\Browser\v8\v8\src\execution\simulator.h:212)
v8::internal::`anonymous namespace'::Invoke [0x0x7ffea9f503cd+5469] (D:\Browser\v8\v8\src\execution\execution.cc:441)
v8::internal::Execution::CallScript [0x0x7ffea9f50c61+513] (D:\Browser\v8\v8\src\execution\execution.cc:542)
v8::Script::Run [0x0x7ffea978b5cf+1135] (D:\Browser\v8\v8\src\api\api.cc:1964)
v8::Script::Run [0x0x7ffea978b148+120] (D:\Browser\v8\v8\src\api\api.cc:1929)
v8::Shell::ExecuteString [0x0x7ff6ae1d21b6+3142] (D:\Browser\v8\v8\src\d8\d8.cc:1030)
v8::SourceGroup::Execute [0x0x7ff6ae1f7e26+1174] (D:\Browser\v8\v8\src\d8\d8.cc:5073)
v8::Shell::RunMainIsolate [0x0x7ff6ae1ff287+631] (D:\Browser\v8\v8\src\d8\d8.cc:6027)
v8::Shell::RunMain [0x0x7ff6ae1feced+205] (D:\Browser\v8\v8\src\d8\d8.cc:5935)
v8::Shell::Main [0x0x7ff6ae201901+3873] (D:\Browser\v8\v8\src\d8\d8.cc:6801)
main [0x0x7ff6ae202333+35] (D:\Browser\v8\v8\src\d8\d8.cc:6893)
invoke_main [0x0x7ff6ae368489+57] (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79)
__scrt_common_main_seh [0x0x7ff6ae3685c2+306] (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
__scrt_common_main [0x0x7ff6ae36864e+14] (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331)
mainCRTStartup [0x0x7ff6ae36866e+14] (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17)
BaseThreadInitThunk [0x0x7fff6adfe8d7+23]
RtlUserThreadStart [0x0x7fff6cafc5dc+44]
The version is stated as V8 13.9.0 (candidate). The reproduction steps are given as a build command and a run command:
python3 tools/dev/gm.py x64.debug
./d8 poc.js
The contents of poc.js are not included in the report, so the exact input that drives the overflow is not shown here. The report also does not describe a fix commit or the patch itself.
Root cause
The failure is an integer overflow in the escape counting logic used when a regular expression's source is escaped. CountAdditionalEscapeChars accumulates the number of characters that will need escaping, and the debug check escapes >= 0 at js-regexp.cc line 234 asserts that this accumulator never goes negative. The observed value, -2005397586, shows it did. The report does not identify the exact input or the precise arithmetic that overflows.
Impact
The report itself does not describe an exploitation scenario. What it establishes is that a crafted regular expression drives an internal counter negative and trips a debug assertion, which in a debug build terminates the process. Whether the same input causes memory corruption or only incorrect behaviour in a release build is not stated. The report gives no further detail on consequences.
How this kind of bug works
Integer overflows arise when arithmetic on a fixed-width integer produces a result outside the type's range. For signed types the result wraps to a large negative value; for unsigned types it wraps to a small value near zero. In memory-safe languages like JavaScript this cannot happen to user-visible numbers, but engine internals written in C++ use native integer types, and a length, count or offset computed from attacker-controlled input can overflow.
The dangerous pattern is an unchecked count that is later used for allocation or indexing. If a length is computed as a small positive number after wrapping, a buffer may be allocated too small and then written past its end; if an offset goes negative, an out-of-bounds read or write can follow. Debug builds often catch the wrap early with assertions like the one in this report, while release builds silently continue with the corrupted value. Defences include using unsigned or wider types for sizes, explicit overflow checks before arithmetic, saturating arithmetic, and bounds checks at the point of use rather than only at the point of computation.
How to test for it
- Identify code paths where a length, count or offset is derived from input you control: string escaping, encoding, parsing of repeated structures, buffer sizing, and anything that multiplies a count by an element size.
- Look for arithmetic on signed types that is not followed by a range check, and for debug assertions that guard such values.
- Exercise the path with inputs near type boundaries: very long strings, deeply repeated patterns, and values close to the maximum of the relevant integer width.
- Run against a debug or assertion-enabled build first, since the assertion often fires before any visible corruption. A positive result is an abort with a message naming a failed range check and a wrapped value.
- Confirm on a release build whether the wrapped value reaches an allocation or index, and whether that produces a crash, a sanitizer report, or observable memory corruption.
Common false positives are inputs that merely hit a resource limit or an out-of-memory condition, and assertions that fire on values which are clamped or checked immediately afterwards. A genuine finding needs the wrapped value to reach a sink.
How it is fixed
The report does not describe a fix commit or the patch itself. Where the count feeds a buffer size, the allocation and the write should use the same checked value.
Hunting notes
This class of bug tends to hide in string and pattern processing, serialisation and deserialisation, image and media parsers, and anywhere a size is computed from a count of elements. Recon signals include code that mixes signed and unsigned types, casts between widths, or multiplies counts by element sizes without checks. To make a report land, show the exact input, the assertion or sanitizer output, and, where possible, evidence that the wrapped value reaches a memory operation in a release build.
Difficulty: advanced. The report concerns engine internals and requires building and running a debug V8, reading C++ stack traces, and reasoning about integer arithmetic in native code.
What happened, in plain words
Every modern browser contains a JavaScript engine: the program that reads the JavaScript code on a web page and runs it. Google Chrome uses an engine called V8. One of the things V8 does is handle regular expressions, which are patterns used to search and match text. When a regular expression is created, V8 sometimes has to escape its source string, meaning it adds backslash characters in front of certain characters so the pattern is stored in a safe, readable form.
Shaheen Fazim reported a bug in that escaping code. It was tracked as CVE-2025-6191, rated high severity, and paid a bounty of 7,000 USD under the Chrome VRP, the programme through which Chrome pays people who report security problems. The report was disclosed on 17 June 2025.
The report is short: a crash trace, a version, and instructions for building and running the engine. The report gives a debug build command and a run command for a proof of concept script against d8, the command-line shell that ships with V8 for testing. A debug build is a version of the software compiled with extra internal checks switched on. When one of those checks fails, the program stops immediately instead of carrying on with a bad value.
The fatal error at the top of the trace reads:
#
# Fatal error in ..\..\src\objects\js-regexp.cc, line 234
# Debug check failed: escapes >= 0 (-2005397586 vs. 0).
#
#
#
#FailureMessage Object: 00000012179FD550
The check that failed is escapes >= 0: the engine expected a count of escape characters to be zero or more. Instead it saw -2005397586. The engine expected a count of escape characters to be zero or more. Instead it saw -2005397586.
The stack trace is the list of function calls that led to the crash, with the most recent call at the top. Reading it from the bottom up shows the journey: the d8 shell runs the script, the interpreter builds a regular expression through Builtins_RegExpConstructor, the runtime function Runtime_RegExpInitializeAndCompile calls into JSRegExp::Initialize, which calls EscapeRegExpSource, which calls CountAdditionalEscapeChars<unsigned short>. It is inside that last function, at js-regexp.cc line 234, that the check fires. The full trace as given is:
==== C stack trace ===============================
v8::base::debug::StackTrace::StackTrace [0x0x7fff2bb5b685+37] (D:\Browser\v8\v8\src\base\debug\stack_trace_win.cc:173)
v8::platform::`anonymous namespace'::PrintStackTrace [0x0x7fff2bcdab89+57] (D:\Browser\v8\v8\src\libplatform\default-platform.cc:28)
V8_Fatal [0x0x7fff2bb35463+323] (D:\Browser\v8\v8\src\base\logging.cc:214)
v8::base::`anonymous namespace'::DefaultDcheckHandler [0x0x7fff2bb34e8c+44] (D:\Browser\v8\v8\src\base\logging.cc:59)
V8_Dcheck [0x0x7fff2bb35571+81] (D:\Browser\v8\v8\src\base\logging.cc:228)
v8::internal::`anonymous namespace'::CountAdditionalEscapeChars<unsigned short> [0x0x7ffeaae0b824+740] (D:\Browser\v8\v8\src\objects\js-regexp.cc:234)
v8::internal::`anonymous namespace'::EscapeRegExpSource [0x0x7ffeaae08824+420] (D:\Browser\v8\v8\src\objects\js-regexp.cc:306)
v8::internal::JSRegExp::Initialize [0x0x7ffeaae07dfa+618] (D:\Browser\v8\v8\src\objects\js-regexp.cc:344)
v8::internal::JSRegExp::Initialize [0x0x7ffeaae08581+529] (D:\Browser\v8\v8\src\objects\js-regexp.cc:179)
v8::internal::__RT_impl_Runtime_RegExpInitializeAndCompile [0x0x7ffeab3fe615+549] (D:\Browser\v8\v8\src\runtime\runtime-regexp.cc:2147)
v8::internal::Runtime_RegExpInitializeAndCompile [0x0x7ffeab3fe10d+413] (D:\Browser\v8\v8\src\runtime\runtime-regexp.cc:2137)
[redacted] [0x0x7ffeaf6b5b41+65]
Builtins_RegExpConstructor [0x0x7ffeaf5f40db+7579]
Builtins_InterpreterPushArgsThenFastConstructFunction [0x0x7ffeaf247501+1089]
Builtins_ConstructHandler [0x0x7ffeafe522c5+8261]
Builtins_InterpreterEntryTrampoline [0x0x7ffeaf2467f2+370]
Builtins_InterpreterEntryTrampoline [0x0x7ffeaf2467f2+370]
Builtins_JSEntryTrampoline [0x0x7ffeaf239ce7+103]
Builtins_JSEntry [0x0x7ffeaf23983f+255]
v8::internal::GeneratedCode<unsigned long long,unsigned long long,unsigned long long,unsigned long long,unsigned long long,long long,unsigned long long **>::Call [0x0x7ffea9f5438c+108] (D:\Browser\v8\v8\src\execution\simulator.h:212)
v8::internal::`anonymous namespace'::Invoke [0x0x7ffea9f503cd+5469] (D:\Browser\v8\v8\src\execution\execution.cc:441)
v8::internal::Execution::CallScript [0x0x7ffea9f50c61+513] (D:\Browser\v8\v8\src\execution\execution.cc:542)
v8::Script::Run [0x0x7ffea978b5cf+1135] (D:\Browser\v8\v8\src\api\api.cc:1964)
v8::Script::Run [0x0x7ffea978b148+120] (D:\Browser\v8\v8\src\api\api.cc:1929)
v8::Shell::ExecuteString [0x0x7ff6ae1d21b6+3142] (D:\Browser\v8\v8\src\d8\d8.cc:1030)
v8::SourceGroup::Execute [0x0x7ff6ae1f7e26+1174] (D:\Browser\v8\v8\src\d8\d8.cc:5073)
v8::Shell::RunMainIsolate [0x0x7ff6ae1ff287+631] (D:\Browser\v8\v8\src\d8\d8.cc:6027)
v8::Shell::RunMain [0x0x7ff6ae1feced+205] (D:\Browser\v8\v8\src\d8\d8.cc:5935)
v8::Shell::Main [0x0x7ff6ae201901+3873] (D:\Browser\v8\v8\src\d8\d8.cc:6801)
main [0x0x7ff6ae202333+35] (D:\Browser\v8\v8\src\d8\d8.cc:6893)
invoke_main [0x0x7ff6ae368489+57] (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79)
__scrt_common_main_seh [0x0x7ff6ae3685c2+306] (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
__scrt_common_main [0x0x7ff6ae36864e+14] (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331)
mainCRTStartup [0x0x7ff6ae36866e+14] (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17)
BaseThreadInitThunk [0x0x7fff6adfe8d7+23]
RtlUserThreadStart [0x0x7fff6cafc5dc+44]
The version is stated as V8 13.9.0 (candidate). The reproduction steps are a build command and a run command:
python3 tools/dev/gm.py x64.debug
./d8 poc.js
The first command is the build command given in the report. The second runs the proof of concept file poc.js in the resulting d8 shell. The contents of poc.js are not included in the report, so the exact input that drives the overflow is not shown. The report also does not describe a fix commit or the patch itself.
In general, how this kind of bug works
Computers store whole numbers in fixed-size slots, like a car odometer with a fixed number of digits. When the odometer passes its highest number it rolls back to zero. A signed integer, one that can hold negative values, rolls over into a large negative number instead. That is an integer overflow: the arithmetic result no longer fits in the slot, so the value wraps around.
In JavaScript itself you cannot normally see this, because the language hides the details of number storage. But the engine underneath is written in C++, where numbers are plain fixed-width types. If a length, count or offset is computed from input that an attacker controls, and nobody checks the result, the value can wrap.
The dangerous part is what happens next. If a wrapped count is used to decide how much memory to reserve, the program may reserve too little and then write past the end of it. If a wrapped offset is used to reach into a buffer, the program may read or write outside it. Debug builds often catch the wrap early with an assertion, a check that stops the program when an internal expectation is broken, as in this report. Release builds, the ones users run, skip those checks and carry on with the corrupted value.
Typical defences are to use unsigned or wider types for sizes, to check explicitly for overflow before doing the arithmetic, and to validate a computed length at the point where it is used, not only where it was calculated.
In general, how to test for it
- Find code paths where a length, count or offset comes from input you control: string escaping, encoding, parsing of repeated structures, buffer sizing, and anything that multiplies a count by an element size.
- Look for arithmetic on signed types with no range check afterwards, and for debug assertions guarding such values.
- Try inputs near the boundaries of the type: very long strings, deeply repeated patterns, values close to the maximum of the relevant integer width.
- Test a debug or assertion-enabled build first, because the assertion often fires before any visible damage. A positive result is an abort naming a failed range check and showing a wrapped value.
- Then check a release build to see whether the wrapped value actually reaches an allocation or an index, and whether that causes a crash, a sanitizer report or observable memory corruption.
Common false positives are inputs that merely hit a resource limit or run out of memory, and assertions that fire on values which are clamped or checked immediately afterwards. A real finding needs the wrapped value to reach a sink, a place where it is used dangerously.
In general, how it is fixed
The report does not describe a fix commit or the patch itself. Where the count feeds a buffer size, the allocation and the write should use the same checked value.
In general, where to hunt
This class of bug tends to hide in string and pattern processing, serialisation and deserialisation, image and media parsers, and anywhere a size is computed from a count of elements. Signals worth watching for include code that mixes signed and unsigned types, casts between widths, or multiplies counts by element sizes without checks. To make a report land, show the exact input, the assertion or sanitizer output, and, where possible, evidence that the wrapped value reaches a memory operation in a release build.
This is advanced work: it involves engine internals, building and running a debug V8, reading C++ stack traces, and reasoning about integer arithmetic in native code.
Glossary
- V8: the JavaScript engine inside Google Chrome, which reads and runs JavaScript code.
- Regular expression: a pattern used to search and match text.
- Escaping: adding backslash characters in front of special characters so a string is stored safely.
- CVE: a public identifier for a known security vulnerability.
- Chrome VRP: Chrome's Vulnerability Reward Program, which pays for security reports.
- Bounty: the money paid for a valid security report.
- Debug build: a version of software compiled with extra internal checks that stop it when something unexpected happens.
- Release build: the version shipped to ordinary users, without those extra checks.
d8: the command-line shell that comes with V8 for running test scripts.- Proof of concept (PoC): a small script or input that demonstrates a bug.
- Stack trace: the list of function calls that led to a crash, most recent first.
- Assertion / debug check: a test inside the code that stops the program if an internal expectation is not met.
- Integer overflow: what happens when a fixed-size number goes past its maximum and wraps around, often to a large negative value.
- Signed / unsigned integer: a whole number type that can hold negatives, versus one that can only hold zero and positives.
- Buffer: a block of memory used to hold data.
- Out-of-bounds read or write: accessing memory outside the intended buffer.
- Sink: the place where a bad value is finally used, such as an allocation size or an index.
- Sanitizer: a tool that detects memory errors while a program runs.