Skip to content
Memory corruption Write-up Advanced

Zooming in on CVE-2024–7965

An inappropriate implementation in Chrome's V8 engine allowed a compiler optimisation to incorrectly assume that certain 32-bit values had zero upper bits, leading to an out-of-bounds memory access. On ARM64 devices, an attacker could exploit this to cause memory corruption and potentially achieve remote code execution in the renderer.

medium.com

Published on medium.com

On August 21, Google released an update for Chrome, fixing a total of 37 security flaws. Researchers across the globe paid their attention to the CVE-2024–7965 vulnerability described as an inappropriate implementation in the browser’s V8 engine.

BI.ZONE, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the compiler's graph traversal for phi nodes did not reset its state between calls, so a cyclic graph could cause a node to be incorrectly marked as having its upper 32 bits guaranteed zero, removing a bounds check.

Impact

On ARM64 devices, the vulnerability could lead to memory corruption and, if combined with a sandbox escape, full control over the browser; Google's Site Isolation limits data theft to the same origin.

What the attacker needed

ARM64 device; Chrome version before 128.0.6613.84; Victim visits a malicious page

How it was found

  1. Create a cyclic graph using loops and conditions.
  2. Use BigInt to cause incorrect values in phi_states_.
  3. Combine Math.min and >>> 0 to add a TruncateInt64ToWord32 node.
  4. Arrange the next call so the index is the number with non-zero upper bits.

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 write-up has not been written yet. The Original tab links to the source.

Chrome runs JavaScript using a component called V8, which includes an optimising compiler. A mistake in that compiler made it trust a value that could actually be larger than expected, so it skipped a safety check when accessing an array. This could let a malicious web page crash or corrupt the browser's memory on some devices.

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.

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.