Skip to content
Memory corruption Write-up Advanced

A Case Study of an Incorrect Bitwise AND Optimization in V8

The talk describes CVE-2021-30599, an incorrect bitwise AND optimization in V8's JIT compiler that can be turned into a type confusion primitive. It covers how the miscompilation was discovered and the broader lessons for auditing JIT compilers.

starlabs.sg

Published on starlabs.sg

Talk delivered at the NUS GreyHats Security Wednesday series (April 2022). A deep dive into CVE-2021-30599, an incorrect bitwise AND optimization in V8’s JIT compiler.

The author, on starlabs.sg

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

Impact

The miscompilation could be turned into a type confusion primitive, though the text does not describe specific exploitation or real-world impact.

What the attacker needed

None

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.

V8 is the JavaScript engine inside Chrome. A JIT compiler speeds up code by translating it while it runs, and a bug in that translation can make the program treat one kind of data as another (type confusion). This talk explains one such mistake and how researchers found it.

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.