Skip to content
DoS Advisory Advanced CVE-2026-16420

Type Confusion in WebAudio (CVE-2026-16420)

Several V8 optimising reductions and materialisation boundaries produce incorrect negative Float64 subnormal values when generated code runs with flush-to-zero and denormals-are-zero enabled. Passing such a value to a one-argument Math.max(v) causes TurboFan range construction to hit a debug assertion in a DCHECK build.

Found by XBOW Follow

Originally disclosed on Chrome VRP

Bounty$500 High View original
  • Fix shipped in 26 days

VULNERABILITY DETAILS

Several V8 optimizing reductions and materialization boundaries are unsound when generated code runs with FTZ/DAZ enabled. This is the same class of issue as crbug.com/528276487 ; the affected optimizations reported here are those that we have shown can reach the DCHECK described below.

The attached script contains cases where the listed V8 optimization itself produces an optimized negative Float64 subnormal. The script then stores that optimized value in a JavaScript variable and passes it to a one-argument Math.max(v) function. In a DCHECK build, optimizing that Math.max(v) function reaches:

Text
Debug check failed: IsInteger(lim.min) && IsInteger(lim.max)

The failing code is TurboFan range construction for Math.max(v). The case IDs below identify different optimizations that can produce the bad input value; they are not intended to claim independent RangeType bugs.

The following case IDs reproduce without experimental V8 feature flags: R002, R003, R004, R007, R008, R012, R022, R023, R024, R025, R033, R048, R049, R050, R052, R053, R054, R060, R061, R063, R069, P002, P003.

One additional case, R064, requires experimental phi-untagging flags: --maglev-future --maglev-untagged-phis --maglev-licm --maglev-range-analysis. This case is included only as feature-gated evidence and should not be treated as enabled in the default V8 configuration.

For R063, the simple literal-object form no longer produces the needed negative subnormal. The attached script uses a loop-write object-field form that still exercises the same object-field Float64 materialization issue.

For R008 and R064, the command line asks the script to optimize the value-producing function with Maglev. The separate Math.max(v) function that hits RangeType::New is then optimized normally by TurboFan.

For R053, the attached script uses a DataView unary-negation operation followed by setFloat64/getFloat64. Raw DataView copy-only variants are not claimed in this report because they do not by themselves demonstrate the same JavaScript-number value flowing into Math.max(v).

I have included details of the affected optimizations as the attachment AFFECTED_OPTIMIZATIONS.md, as the list is too long to include inline.

VERSION

Chrome Version: 151.0.7915.0 dev build.

Operating System: Ubuntu 24.04.4 LTS x86_64 (Linux 6.17.0-1010-aws).

Validated against:

  • Chromium checkout: 6f813967910885b4b8dafaf6a72b7a5c80fba157.
  • V8 checkout: 0021d325c3a448f4e26e21ef4e0db1bea1e39fda.
  • d8 / V8 version: 15.1.192.
  • DCHECK validation build: dcheck_always_on = true.

REPRODUCTION CASE

Attached file: dcheck_poc.js.

List supported cases:

Bash
DCHECK_D8=${DCHECK_D8:-/home/moyix/chromium-src-codex/src/out/dcheck-d8/d8}
"$DCHECK_D8" --allow-natives-syntax --flush-denormals \
  dcheck_poc.js -- list

Representative JavaScript case:

Bash
"$DCHECK_D8" --allow-natives-syntax --flush-denormals \
  dcheck_poc.js -- r002_mul_one_neg captured-dcheck

Representative Maglev case:

Bash
"$DCHECK_D8" --allow-natives-syntax --flush-denormals \
  dcheck_poc.js -- r008_maglev_min_daz_tie_neg captured-dcheck maglev

Feature-gated Maglev phi-untagging case:

Bash
"$DCHECK_D8" --allow-natives-syntax --flush-denormals \
  --maglev --maglev-future --maglev-untagged-phis \
  --maglev-licm --maglev-range-analysis \
  dcheck_poc.js -- r064_phi_branch_neg captured-dcheck maglev

The R064 command intentionally does not use --maglev-as-top-tier or --optimize-on-next-call-optimizes-to-maglev: the value-producing function is optimized with Maglev via the script argument, while the Math.max(v) function that reaches RangeType::New is optimized normally by TurboFan.

Representative Wasm case:

Bash
"$DCHECK_D8" --allow-natives-syntax --flush-denormals \
  --wasm-sync-tier-up --no-wasm-native-module-cache \
  dcheck_poc.js -- r069_f64_floor_neg captured-dcheck

Use captured-range instead of captured-dcheck to print the optimized value and the Math.max(v) result without intentionally aborting. captured-dcheck retries the Math.max(v) function up to five times because successful reproductions abort while that function is being optimized.

FOR CRASHES, PLEASE INCLUDE THE FOLLOWING ADDITIONAL INFORMATION Type of crash: d8 DCHECK abort in a dcheck_always_on = true validation build.

Crash State:

Text
PRODUCER r002_mul_one_neg R002 base=0x8000000000000000 opt=0x8004df9f8cb29569 baseNegSub=false optNegSub=true status=41

#
# Fatal error in ../../v8/src/compiler/turbofan-types.h, line 378
# Debug check failed: IsInteger(lim.min) && IsInteger(lim.max).
#

==== C stack trace ===============================

v8::internal::compiler::RangeType::New(v8::internal::compiler::RangeType::Limits, v8::internal::Zone*)+0x191
v8::internal::compiler::Type::Intersect(v8::internal::compiler::Type, v8::internal::compiler::Type, v8::internal::Zone*)+0x191
v8::internal::compiler::OperationTyper::ToNumber(v8::internal::compiler::Type)+0x14a
v8::internal::compiler::Typer::Visitor::Reduce(v8::internal::compiler::Node*)+0x1b
v8::internal::compiler::GraphReducer::Reduce(v8::internal::compiler::Node*)+0xc6
v8::internal::compiler::Typer::Run(...)+0xd0
v8::internal::compiler::PipelineImpl::OptimizeTurbofanGraph(...)+0xe3

CREDIT INFORMATION

Reporter credit: Found by XBOW and triaged by Brendan Dolan-Gavitt

The original report as published on the Chromium issue tracker, by Found by XBOW and triaged by Brendan Dolan-Gavitt. 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. 8 min read.

Context

This is a V8 correctness bug that surfaces as a DCHECK failure in TurboFan's type system, reported against Google Chrome through the Chrome VRP. The report concerns V8 optimising reductions and materialisation boundaries that become unsound when generated code runs with FTZ/DAZ (flush-to-zero / denormals-are-zero) enabled, and the observable failure is a debug assertion in TurboFan range construction for Math.max(v).

The report states explicitly that this is the same class of issue as crbug.com/528276487, and that the optimisations listed are those the reporter has shown can reach the DCHECK described below. The case IDs identify different optimisations that can produce the bad input value; the report does not claim they are independent RangeType bugs.

The underlying mechanism, in general terms: an optimised function produces a negative Float64 subnormal. That value is stored in a JavaScript variable and passed to a one-argument Math.max(v) function. When that Math.max(v) function is itself optimised, TurboFan builds a range for it and hits an assertion that the range limits are integers.

Setup

The reporter validated against a specific Chromium and V8 checkout, using a DCHECK build.

  • Chrome Version: 151.0.7915.0 dev build.
  • Operating System: Ubuntu 24.04.4 LTS x86_64 (Linux 6.17.0-1010-aws).
  • Chromium checkout: [redacted].
  • V8 checkout: [redacted].
  • d8 / V8 version: 15.1.192.
  • DCHECK validation build: dcheck_always_on = true.

The reproduction is a single attached script, dcheck_poc.js, driven by a DCHECK-enabled d8. The reporter also attached AFFECTED_OPTIMIZATIONS.md with details of the affected optimisations, because the list is too long to include inline.

Finding it

The reporter noticed that several V8 optimising reductions and materialisation boundaries are unsound when generated code runs with FTZ/DAZ enabled. The concrete symptom is that an optimisation produces an optimised negative Float64 subnormal, which is then stored in a JavaScript variable and passed to a one-argument Math.max(v). Optimising that Math.max(v) function in a DCHECK build reaches:

Text
Debug check failed: IsInteger(lim.min) && IsInteger(lim.max)

The failing code is TurboFan range construction for Math.max(v). The case IDs in the script identify which optimisation produced the bad input value; they are not separate RangeType bugs.

The reporter split the cases by the conditions needed to reproduce them:

  • Cases that reproduce without experimental V8 feature flags: R002, R003, R004, R007, R008, R012, R022, R023, R024, R025, R033, R048, R049, R050, R052, R053, R054, R060, R061, R063, R069, P002, P003.
  • One case, R064, requires experimental phi-untagging flags: --maglev-future --maglev-untagged-phis --maglev-licm --maglev-range-analysis. The report includes it only as feature-gated evidence and states it should not be treated as enabled in the default V8 configuration.

A few cases have specific notes:

  • For R063, the simple literal-object form no longer produces the needed negative subnormal. The attached script uses a loop-write object-field form that still exercises the same object-field Float64 materialisation issue.
  • For R008 and R064, the command line asks the script to optimise the value-producing function with Maglev. The separate Math.max(v) function that hits RangeType::New is then optimised normally by TurboFan.
  • For R053, the script uses a DataView unary-negation operation followed by setFloat64/getFloat64. Raw DataView copy-only variants are not claimed in the report because they do not by themselves demonstrate the same JavaScript-number value flowing into Math.max(v).

Exploitation

These are reproduction steps against a local DCHECK build, not a remote attack sequence. Each command is run against dcheck_poc.js with --allow-natives-syntax --flush-denormals.

Step 1: list the supported cases

Bash
DCHECK_D8=${DCHECK_D8:-/home/moyix/chromium-src-codex/src/out/dcheck-d8/d8}
"$DCHECK_D8" --allow-natives-syntax --flush-denormals \
  dcheck_poc.js -- list

This enumerates the case IDs the script supports.

Step 2: run a representative JavaScript case

Bash
"$DCHECK_D8" --allow-natives-syntax --flush-denormals \
  dcheck_poc.js -- r002_mul_one_neg captured-dcheck

The second argument, captured-dcheck, selects the mode that intentionally aborts once the Math.max(v) function is being optimised and the DCHECK fires.

Step 3: run a representative Maglev case

Bash
"$DCHECK_D8" --allow-natives-syntax --flush-denormals \
  dcheck_poc.js -- r008_maglev_min_daz_tie_neg captured-dcheck maglev

The trailing maglev argument asks the script to optimise the value-producing function with Maglev. The Math.max(v) function that reaches RangeType::New is still optimised normally by TurboFan.

Step 4: run the feature-gated phi-untagging case

Bash
"$DCHECK_D8" --allow-natives-syntax --flush-denormals \
  --maglev --maglev-future --maglev-untagged-phis \
  --maglev-licm --maglev-range-analysis \
  dcheck_poc.js -- r064_phi_branch_neg captured-dcheck maglev

This is R064, which needs the experimental flags listed above. The report notes that the command intentionally does not use --maglev-as-top-tier or --optimize-on-next-call-optimizes-to-maglev: the value-producing function is optimised with Maglev via the script argument, while the Math.max(v) function that reaches RangeType::New is optimised normally by TurboFan.

Step 5: run a representative Wasm case

Bash
"$DCHECK_D8" --allow-natives-syntax --flush-denormals \
  --wasm-sync-tier-up --no-wasm-native-module-cache \
  dcheck_poc.js -- r069_f64_floor_neg captured-dcheck

R069 is the representative Wasm case, run with --wasm-sync-tier-up --no-wasm-native-module-cache.

Step 6: inspect without aborting

Use captured-range instead of captured-dcheck to print the optimised value and the Math.max(v) result without intentionally aborting. captured-dcheck retries the Math.max(v) function up to five times, because successful reproductions abort while that function is being optimised.

What the crash looks like

The crash is a d8 DCHECK abort in a dcheck_always_on = true validation build. For R002 the crash state is:

Text
PRODUCER r002_mul_one_neg R002 base=0x8000000000000000 opt=0x8004df9f8cb29569 baseNegSub=false optNegSub=true status=41

#
# Fatal error in ../../v8/src/compiler/turbofan-types.h, line 378
# Debug check failed: IsInteger(lim.min) && IsInteger(lim.max).
#

==== C stack trace ===============================

v8::internal::compiler::RangeType::New(v8::internal::compiler::RangeType::Limits, v8::internal::Zone*)+0x191
v8::internal::compiler::Type::Intersect(v8::internal::compiler::Type, v8::internal::compiler::Type, v8::internal::Zone*)+0x191
v8::internal::compiler::OperationTyper::ToNumber(v8::internal::compiler::Type)+0x14a
v8::internal::compiler::Typer::Visitor::Reduce(v8::internal::compiler::Node*)+0x1b
v8::internal::compiler::GraphReducer::Reduce(v8::internal::compiler::Node*)+0xc6
v8::internal::compiler::Typer::Run(...)+0xd0
v8::internal::compiler::PipelineImpl::OptimizeTurbofanGraph(...)+0xe3

The PRODUCER line shows the base value and the optimised value for the case: the base is 0x8000000000000000 and the optimised value is 0x8004df9f8cb29569, with baseNegSub=false and optNegSub=true. In other words, the optimisation turned a value that was not a negative subnormal into one.

Root cause

TurboFan's RangeType::New asserts that the limits it is given are integers:

Text
Debug check failed: IsInteger(lim.min) && IsInteger(lim.max)

The stack shows the assertion being reached from Type::Intersect, called by OperationTyper::ToNumber, while the typer is reducing a node during Typer::Run inside PipelineImpl::OptimizeTurbofanGraph. So the range being constructed for Math.max(v) carries non-integer limits, and the DCHECK rejects them.

The input to that range comes from an earlier optimisation that produced a negative Float64 subnormal while running with FTZ/DAZ enabled. The report frames this as a class of unsoundness in V8 optimising reductions and materialisation boundaries under FTZ/DAZ, the same class as crbug.com/528276487. The individual case IDs are different optimisations that can produce the bad value, not separate RangeType bugs.

The report does not go further into which specific reduction or materialisation boundary is wrong in each case; that detail is in the attached AFFECTED_OPTIMIZATIONS.md, which is not reproduced here.

Impact

The report describes the impact as a d8 DCHECK abort in a dcheck_always_on = true validation build. It does not describe a release-build exploit primitive, memory corruption, or a path to code execution, and it does not claim any of those.

The practical significance is that V8's optimiser can produce a value that violates an invariant its own type system relies on. Most listed cases reproduce without experimental flags, while R064 requires experimental phi-untagging flags and the report says it should not be treated as enabled in the default V8 configuration. while R064 requires experimental phi-untagging flags and the report says it should not be treated as enabled in the default V8 configuration.

Fix

The report does not describe a fix or a patch. It documents the failing assertion, the affected optimisations and the reproduction cases, and leaves the correction to the V8 team.

Variants to test

These are concrete directions suggested by the report's own structure, for anyone probing similar optimiser soundness issues.

  1. Other reductions that can materialise Float64 values. Take each optimisation named in AFFECTED_OPTIMIZATIONS.md and check whether, under --flush-denormals, it can produce a negative subnormal that then flows into a typed operation. A positive result is the same IsInteger(lim.min) && IsInteger(lim.max) DCHECK in RangeType::New.
  2. Other consumers than Math.max(v). The report only demonstrates the one-argument Math.max(v) path into RangeType::New. Feeding the same optimised value into other typed builtins or operations that build ranges is worth trying; a positive result is a DCHECK or a printed captured-range value that disagrees with the unoptimised result.
  3. Object-field materialisation. R063 shows that the literal-object form stopped producing the negative subnormal while a loop-write object-field form still did. Try other ways of writing a Float64 into an object field and check whether the optimised value becomes a negative subnormal.
  4. DataView paths. R053 uses unary negation followed by setFloat64/getFloat64. The report explicitly does not claim raw DataView copy-only variants, because they do not by themselves demonstrate the JavaScript-number value flowing into Math.max(v). A useful variant is a DataView path that does carry the value into a typed consumer.
  5. Maglev versus TurboFan split. R008 and R064 optimise the producer with Maglev and let TurboFan optimise the Math.max(v) consumer. Try the same split with other producers and confirm the abort still occurs in the TurboFan typer.
  6. Wasm producers. R069 reaches the same failure through Wasm with --wasm-sync-tier-up --no-wasm-native-module-cache. Other Wasm float operations that can yield negative subnormals under FTZ/DAZ are worth checking against the same consumer.
  7. Feature-gated phi untagging. R064 needs --maglev-future --maglev-untagged-phis --maglev-licm --maglev-range-analysis. Treat any result there as feature-gated evidence only, not as a default-configuration issue.

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. 18 min read.

What happened, in plain words

A browser is a very complicated program, and the part of Chrome that runs the JavaScript on web pages is called V8. V8 does not simply read your code line by line every time. To make pages fast, it watches which functions run often and then rewrites them into a faster, optimised form. That rewriting is done by two internal components called TurboFan and Maglev.

This report is about a mistake in that rewriting. Under a particular numeric setting, an optimisation can turn one number into a different, very unusual number. That unusual number is then handed to a built-in JavaScript function, Math.max(v), which returns the larger of its arguments. When V8 tries to optimise that Math.max(v) function too, it makes an assumption about the kind of numbers involved, and the unusual number breaks that assumption. In a special debugging build of V8, the program stops with an error message instead of carrying on.

That is the whole story: a speed optimisation produces a value that the optimiser's own internal rules say cannot exist, and a debug build catches it. The report does not describe a way to attack a normal user's browser. It is a correctness bug report, filed through Google's Chrome Vulnerability Reward Program (VRP), the scheme that pays people for finding and reporting problems in Chrome.

Context

The pieces involved

Before the details, here are the main parts, explained from scratch.

  • V8 is the JavaScript engine inside Chrome. A JavaScript engine is the program that reads JavaScript and actually executes it. Every browser needs one because web pages are mostly JavaScript.
  • TurboFan and Maglev are two of V8's optimising compilers. A compiler here means a piece of software that translates code from the form a human wrote into a faster form the machine can run. An optimising compiler additionally tries to make that translated code quicker, sometimes by making assumptions such as "this variable will always hold a whole number".
  • FTZ/DAZ stands for flush-to-zero and denormals-are-zero. These are settings on the processor that change how it treats extremely small numbers (see the glossary). When they are on, the processor quietly rounds some tiny values to zero. The bug only appears when generated code runs with these settings enabled.
  • A DCHECK is a debug check: an assertion, meaning a statement inside the program that says "this must be true". DCHECKs are only compiled into special debug builds, not into the version of Chrome that ordinary people download. If a DCHECK turns out to be false, the program stops immediately with a message. That is exactly what happens here.
  • A Float64 is the way computers store a decimal number using 64 bits (binary digits). JavaScript numbers are Float64 values.
  • A subnormal is an extremely small Float64 number, smaller than the smallest "normal" one. A negative subnormal is simply one below zero.
  • A type system, in a compiler, is the set of rules the compiler uses to reason about what kind of value a variable can hold. If the compiler believes a value is always a whole number and it turns out not to be, the type system has been broken.

What the report says about the class of bug

The report states explicitly that this is the same class of issue as crbug.com/528276487, an earlier bug tracked in Chromium's issue tracker. It also says the optimisations listed are those the reporter has shown can reach the DCHECK described below. The case IDs (labels such as R002) identify different optimisations that can produce the bad input value; the report does not claim they are independent RangeType bugs.

The underlying mechanism, in general terms: an optimised function produces a negative Float64 subnormal. That value is stored in a JavaScript variable and passed to a one-argument Math.max(v) function. When that Math.max(v) function is itself optimised, TurboFan builds a range for it and hits an assertion that the range limits are integers.

A range here means the compiler's note to itself about the smallest and largest value a number can take, for example "between 1 and 10". The assertion says those two limits must be whole numbers. A subnormal is not a whole number, so the assertion fails.

Setup

The reporter validated against a specific Chromium and V8 checkout, using a DCHECK build.

  • Chrome Version: 151.0.7915.0 dev build.
  • Operating System: Ubuntu 24.04.4 LTS x86_64 (Linux 6.17.0-1010-aws).
  • Chromium checkout: [redacted].
  • V8 checkout: [redacted].
  • d8 / V8 version: 15.1.192.
  • DCHECK validation build: dcheck_always_on = true.

A few of those terms need unpacking.

  • A checkout is a copy of a project's source code at one exact moment, identified by a long string of letters and digits called a commit hash. Using a checkout means the reporter and the V8 team are looking at precisely the same code.
  • Chromium is the open-source project that Chrome is built from.
  • d8 is a small command-line program that runs JavaScript using V8 directly, without a browser window. It is the standard tool for testing V8 itself.
  • dcheck_always_on = true is a build setting that forces all the debug checks to be included, even in a build that would otherwise leave them out. Without it, the failing assertion would not be present and nothing would stop.

The reproduction is a single attached script, dcheck_poc.js, driven by a DCHECK-enabled d8. The reporter also attached AFFECTED_OPTIMIZATIONS.md with details of the affected optimisations, because the list is too long to include inline.

Finding it

The reporter noticed that several V8 optimising reductions and materialisation boundaries are unsound when generated code runs with FTZ/DAZ enabled.

Two more terms:

  • A reduction is a step in optimisation where the compiler replaces a complicated piece of code with a simpler, faster equivalent.
  • A materialisation boundary is the point where a value that has been living in a fast internal form is turned into a real JavaScript value, or the other way round. Think of it as the moment a number is taken out of a special drawer and put into an ordinary envelope.

The concrete symptom is that an optimisation produces an optimised negative Float64 subnormal, which is then stored in a JavaScript variable and passed to a one-argument Math.max(v). Optimising that Math.max(v) function in a DCHECK build reaches:

Text
Debug check failed: IsInteger(lim.min) && IsInteger(lim.max)

Line by line:

  • Debug check failed: is the prefix the debug build prints when an assertion turns out to be false.
  • IsInteger(lim.min) asks whether the lower limit of the range is a whole number.
  • IsInteger(lim.max) asks the same about the upper limit.
  • && means "and", so the whole check passes only if both limits are whole numbers. Here one of them is not, so the check fails.

The failing code is TurboFan range construction for Math.max(v). The case IDs in the script identify which optimisation produced the bad input value; they are not separate RangeType bugs.

The reporter split the cases by the conditions needed to reproduce them:

  • Cases that reproduce without experimental V8 feature flags: R002, R003, R004, R007, R008, R012, R022, R023, R024, R025, R033, R048, R049, R050, R052, R053, R054, R060, R061, R063, R069, P002, P003.
  • One case, R064, requires experimental phi-untagging flags: --maglev-future --maglev-untagged-phis --maglev-licm --maglev-range-analysis. The report includes it only as feature-gated evidence and states it should not be treated as enabled in the default V8 configuration.

A feature flag is a switch you can pass to a program to turn an unfinished or experimental behaviour on or off. "Feature-gated" means the behaviour only happens when the switch is flipped, so it is not part of what ordinary users get. "Phi-untagging" is an internal Maglev optimisation; the report does not explain it further, and the important point for a newcomer is simply that R064 needs extra switches that are off by default.

A few cases have specific notes:

  • For R063, the simple literal-object form no longer produces the needed negative subnormal. The attached script uses a loop-write object-field form that still exercises the same object-field Float64 materialisation issue.
  • For R008 and R064, the command line asks the script to optimise the value-producing function with Maglev. The separate Math.max(v) function that hits RangeType::New is then optimised normally by TurboFan.
  • For R053, the script uses a DataView unary-negation operation followed by setFloat64/getFloat64. Raw DataView copy-only variants are not claimed in the report because they do not by themselves demonstrate the same JavaScript-number value flowing into Math.max(v).

A DataView is a JavaScript object that lets code read and write raw bytes in a block of memory, with methods such as setFloat64 (write a 64-bit decimal number) and getFloat64 (read one back). Unary negation means flipping the sign of a number, turning a positive value into a negative one. The point of the note is that only the version that negates the value counts as evidence; merely copying bytes around does not show the bad number reaching Math.max(v).

Exploitation

These are reproduction steps against a local DCHECK build, not a remote attack sequence. Each command is run against dcheck_poc.js with --allow-natives-syntax --flush-denormals.

Two flags appear in every command:

Step 1: list the supported cases

Bash
DCHECK_D8=${DCHECK_D8:-/home/moyix/chromium-src-codex/src/out/dcheck-d8/d8}
"$DCHECK_D8" --allow-natives-syntax --flush-denormals \
  dcheck_poc.js -- list

Line by line:

  • DCHECK_D8=${DCHECK_D8:-...} sets a shell variable named DCHECK_D8 to the path of the debug d8 program. If the variable is already set, that value is kept; otherwise the path after :- is used. This is just a convenience so the long path is written once.
  • "$DCHECK_D8" runs that program.
  • --allow-natives-syntax and --flush-denormals are the two flags described above.
  • dcheck_poc.js is the script to run.
  • -- list passes list as an argument to the script, telling it to print the case IDs it supports.

This enumerates the case IDs the script supports. --flush-denormals is what puts the generated code into the FTZ/DAZ regime the bug depends on, and --allow-natives-syntax lets the script use V8's internal test intrinsics.

Step 2: run a representative JavaScript case

Bash
"$DCHECK_D8" --allow-natives-syntax --flush-denormals \
  dcheck_poc.js -- r002_mul_one_neg captured-dcheck

Line by line:

  • The first line is the same program and the same two flags as before.
  • captured-dcheck selects the mode that intentionally aborts once the Math.max(v) function is being optimised and the DCHECK fires.

Step 3: run a representative Maglev case

Bash
"$DCHECK_D8" --allow-natives-syntax --flush-denormals \
  dcheck_poc.js -- r008_maglev_min_daz_tie_neg captured-dcheck maglev

Line by line:

  • r008_maglev_min_daz_tie_neg is the case name for R008.
  • captured-dcheck again asks for the aborting mode.
  • The trailing maglev argument asks the script to optimise the value-producing function with Maglev. The Math.max(v) function that reaches RangeType::New is still optimised normally by TurboFan.

Step 4: run the feature-gated phi-untagging case

Bash
"$DCHECK_D8" --allow-natives-syntax --flush-denormals \
  --maglev --maglev-future --maglev-untagged-phis \
  --maglev-licm --maglev-range-analysis \
  dcheck_poc.js -- r064_phi_branch_neg captured-dcheck maglev

Line by line:

  • r064_phi_branch_neg is the case name for R064, and captured-dcheck maglev again select the aborting mode and the Maglev producer.

This is R064, which needs the experimental flags listed above. The report notes that the command intentionally does not use --maglev-as-top-tier or --optimize-on-next-call-optimizes-to-maglev: the value-producing function is optimised with Maglev via the script argument, while the Math.max(v) function that reaches RangeType::New is optimised normally by TurboFan. In other words, the reporter wants one half of the code optimised by one compiler and the other half by the other, because that split is what triggers the failure.

Step 5: run a representative Wasm case

Bash
"$DCHECK_D8" --allow-natives-syntax --flush-denormals \
  --wasm-sync-tier-up --no-wasm-native-module-cache \
  dcheck_poc.js -- r069_f64_floor_neg captured-dcheck

Line by line:

  • r069_f64_floor_neg is the case name for R069, and captured-dcheck selects the aborting mode.

WebAssembly, or Wasm, is a second language that browsers can run, designed to be fast and to be produced by other languages such as C++. R069 exercises the same pattern through Wasm, with synchronous tier-up and the native module cache disabled.

Step 6: inspect without aborting

Use captured-range instead of captured-dcheck to print the optimised value and the Math.max(v) result without intentionally aborting. captured-dcheck retries the Math.max(v) function up to five times, because successful reproductions abort while that function is being optimised.

This is a practical detail: because the program dies at the moment of optimisation, the script has to try again a few times to catch it. The captured-range mode is the gentler option, letting you see the numbers instead of crashing.

What the crash looks like

The crash is a d8 DCHECK abort in a dcheck_always_on = true validation build. For R002 the crash state is:

Text
PRODUCER r002_mul_one_neg R002 base=0x8000000000000000 opt=0x8004df9f8cb29569 baseNegSub=false optNegSub=true status=41

#
# Fatal error in ../../v8/src/compiler/turbofan-types.h, line 378
# Debug check failed: IsInteger(lim.min) && IsInteger(lim.max).
#

==== C stack trace ===============================

v8::internal::compiler::RangeType::New(v8::internal::compiler::RangeType::Limits, v8::internal::Zone*)+0x191
v8::internal::compiler::Type::Intersect(v8::internal::compiler::Type, v8::internal::compiler::Type, v8::internal::Zone*)+0x191
v8::internal::compiler::OperationTyper::ToNumber(v8::internal::compiler::Type)+0x14a
v8::internal::compiler::Typer::Visitor::Reduce(v8::internal::compiler::Node*)+0x1b
v8::internal::compiler::GraphReducer::Reduce(v8::internal::compiler::Node*)+0xc6
v8::internal::compiler::Typer::Run(...)+0xd0
v8::internal::compiler::PipelineImpl::OptimizeTurbofanGraph(...)+0xe3

Line by line:

  • The PRODUCER line is the script's own summary of the case. base=0x8000000000000000 is the original value written in hexadecimal, and opt=0x8004df9f8cb29569 is the value after optimisation. baseNegSub=false says the original was not a negative subnormal; optNegSub=true says the optimised one is.
  • Fatal error in ../../v8/src/compiler/turbofan-types.h, line 378 names the source file and line where the check lives. A header file ending in .h is a file of shared declarations in a C++ project.
  • Debug check failed: IsInteger(lim.min) && IsInteger(lim.max). is the same assertion as before.
  • ==== C stack trace =============================== introduces the list of function calls that led to the failure, innermost first. A stack trace is like a list of who called whom, so you can see the path the program took.
  • RangeType::New is the function that builds a range and performs the check.
  • Type::Intersect combines two types and calls RangeType::New.
  • OperationTyper::ToNumber is the part of the typer that reasons about converting a value to a number.
  • Typer::Visitor::Reduce, GraphReducer::Reduce, Typer::Run and PipelineImpl::OptimizeTurbofanGraph are the surrounding steps of the optimisation pipeline, from the typer visiting a node up to the whole TurboFan optimisation run.

The PRODUCER line shows the base value and the optimised value for the case: the base is 0x8000000000000000 (negative zero as a Float64 bit pattern) and the optimised value is 0x8004df9f8cb29569, with baseNegSub=false and optNegSub=true. In other words, the optimisation turned a value that was not a negative subnormal into one.

Root cause

TurboFan's RangeType::New asserts that the limits it is given are integers:

Text
Debug check failed: IsInteger(lim.min) && IsInteger(lim.max)

The stack shows the assertion being reached from Type::Intersect, called by OperationTyper::ToNumber, while the typer is reducing a node during Typer::Run inside PipelineImpl::OptimizeTurbofanGraph. So the range being constructed for Math.max(v) carries non-integer limits, and the DCHECK rejects them.

The input to that range comes from an earlier optimisation that produced a negative Float64 subnormal while running with FTZ/DAZ enabled. The report frames this as a class of unsoundness in V8 optimising reductions and materialisation boundaries under FTZ/DAZ, the same class as crbug.com/528276487. The individual case IDs are different optimisations that can produce the bad value, not separate RangeType bugs.

"Unsound" here means the compiler's reasoning is not guaranteed to be true. A sound optimisation can never change what a program computes; an unsound one can, and in this case it produces a value the rest of the compiler was not prepared for.

The report does not go further into which specific reduction or materialisation boundary is wrong in each case; that detail is in the attached AFFECTED_OPTIMIZATIONS.md, which is not reproduced here.

Impact

The report describes the impact as a d8 DCHECK abort in a dcheck_always_on = true validation build.

A release build is the version of the software shipped to ordinary users, with the debug checks removed. An exploit primitive is a small building block that an attacker could use towards taking over a machine; the report does not claim one exists here. Memory corruption means a program writing to memory it should not touch, which is the usual route to serious security problems; again, the report does not claim it.

The practical significance is that V8's optimiser can produce a value that violates an invariant its own type system relies on. An invariant is a rule that is supposed to hold at all times. Most listed cases reproduce without experimental flags, while R064 requires experimental phi-untagging flags and the report says it should not be treated as enabled in the default V8 configuration. while R064 requires experimental phi-untagging flags and the report says it should not be treated as enabled in the default V8 configuration.

Fix

It documents the failing assertion, the affected optimisations and the reproduction cases, and leaves the correction to the V8 team.

Variants to test

These are concrete directions suggested by the report's own structure, for anyone probing similar optimiser soundness issues.

  1. Other reductions that can materialise Float64 values. Take each optimisation named in AFFECTED_OPTIMIZATIONS.md and check whether, under --flush-denormals, it can produce a negative subnormal that then flows into a typed operation. A positive result is the same IsInteger(lim.min) && IsInteger(lim.max) DCHECK in RangeType::New.
  2. Other consumers than Math.max(v). The report only demonstrates the one-argument Math.max(v) path into RangeType::New. Feeding the same optimised value into other typed builtins or operations that build ranges is worth trying; a positive result is a DCHECK or a printed captured-range value that disagrees with the unoptimised result.
  3. Object-field materialisation. R063 shows that the literal-object form stopped producing the negative subnormal while a loop-write object-field form still did. Try other ways of writing a Float64 into an object field and check whether the optimised value becomes a negative subnormal.
  4. DataView paths. R053 uses unary negation followed by setFloat64/getFloat64. The report explicitly does not claim raw DataView copy-only variants, because they do not by themselves demonstrate the JavaScript-number value flowing into Math.max(v). A useful variant is a DataView path that does carry the value into a typed consumer.
  5. Maglev versus TurboFan split. R008 and R064 optimise the producer with Maglev and let TurboFan optimise the Math.max(v) consumer. Try the same split with other producers and confirm the abort still occurs in the TurboFan typer.
  6. Wasm producers. R069 reaches the same failure through Wasm with --wasm-sync-tier-up --no-wasm-native-module-cache. Other Wasm float operations that can yield negative subnormals under FTZ/DAZ are worth checking against the same consumer.
  7. Feature-gated phi untagging. R064 needs --maglev-future --maglev-untagged-phis --maglev-licm --maglev-range-analysis. Treat any result there as feature-gated evidence only, not as a default-configuration issue.

Glossary

  • API: a defined set of functions one program offers to another so they can talk to each other; here, the built-in JavaScript functions such as Math.max.
  • Assertion: a statement inside a program that something must be true, checked while the program runs.
  • Checkout: a copy of a project's source code at one exact moment, identified by a commit hash.
  • Chromium: the open-source project that Google Chrome is built from.
  • Commit hash: a long string of letters and digits that uniquely identifies one version of a source code repository.
  • Compiler: software that translates code from one form into another, usually into a faster form the machine can run.
  • DCHECK: a debug check, an assertion compiled only into special debug builds.
  • d8: a small command-line program that runs JavaScript with V8 directly, without a browser.
  • DataView: a JavaScript object for reading and writing raw bytes in memory, with methods such as setFloat64 and getFloat64.
  • Denormal / subnormal: an extremely small floating-point number, smaller than the smallest normal one.
  • Exploit primitive: a small building block an attacker could use towards taking over a machine.
  • Feature flag: a switch passed to a program to turn an experimental behaviour on or off.
  • Feature-gated: only happening when an experimental switch is flipped, so not part of the default configuration.
  • Float64: a way of storing a decimal number in 64 bits; JavaScript numbers are Float64 values.
  • Flush-to-zero / denormals-are-zero (FTZ/DAZ): processor settings that make extremely small numbers be treated as zero.
  • Header file: a file ending in .h in a C++ project that holds shared declarations.
  • Invariant: a rule that is supposed to hold at all times.
  • Loop-invariant code motion (LICM): an optimisation that moves work out of a loop when the result would be the same on every pass.
  • Maglev: one of V8's optimising compilers.
  • Materialisation boundary: the point where a value in a fast internal form is turned into a real JavaScript value, or the reverse.
  • Memory corruption: a program writing to memory it should not touch, the usual route to serious security problems.
  • Negative subnormal: a subnormal number below zero.
  • Optimising compiler: a compiler that also tries to make the translated code faster, often by making assumptions about values.
  • Range: the compiler's note about the smallest and largest value a number can take.
  • Reduction: an optimisation step that replaces complicated code with a simpler, faster equivalent.
  • Release build: the version of software shipped to ordinary users, with debug checks removed.
  • Soundness: the property that a compiler's reasoning is always true, so an optimisation never changes what a program computes.
  • Stack trace: the list of function calls that led to a failure, innermost first.
  • Subnormal: see denormal.
  • TurboFan: one of V8's optimising compilers.
  • Type system: the compiler's rules for reasoning about what kind of value a variable can hold.
  • Unary negation: flipping the sign of a number, turning a positive value into a negative one.
  • Unsound: not guaranteed to be true; an unsound optimisation can change what a program computes.
  • V8: the JavaScript engine inside Chrome, the program that reads and executes JavaScript.
  • VRP (Vulnerability Reward Program): Google's scheme that pays people for finding and reporting problems in Chrome.
  • WebAssembly (Wasm): a second language browsers can run, designed to be fast and to be produced by other languages such as C++.
  • WebAudio: the browser feature that lets web pages generate and process sound.

More by Found by XBOW

View all

1 more disclosed report, 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.

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.