JavaScriptCore tracks every opcode's metadata in a table. The offsets were 32-bit. Nobody checked what happens past four billion.
We generated 44.7 million call opcodes in a single function — pure JavaScript, no APIs, no clicks — and opened it in Safari on an iPhone. The renderer hit its resource guard and took the whole app down. On macOS, the same page went further: memory pressure cascaded until the kernel's watchdog fired and the Mac rebooted.
This is the story of CVE-2026-64784, fixed in iOS/macOS 26.6.2 (17 August 2026) — and of the fuzzing mindset that finds this bug class: extreme scale beats malformed input.
Discovery credit: Janggoon Lee (Out of Bounds) and OpenAI Codex Security. This is a reproduction and teaching analysis of the public fix, not an original finding.
When JSC parses JavaScript, the bytecompiler emits an unlinked code block plus a metadata table: one record per opcode that needs runtime bookkeeping (calls, property loads, and friends). At link time, UnlinkedMetadataTable::finalize() computes where each record lands in the final buffer — accumulating offsets in 32-bit unsigned integers, unchecked.
Feed it enough metadata-bearing opcodes and the running offset wraps past 232. The linker then reads and writes metadata at wrapped offsets: out-of-bounds against the real allocation. Apple: “Processing maliciously crafted web content may lead to an unexpected Safari crash” — an OOB access fixed with improved bounds checking (Bugzilla 317632).
97df94ead028 (319678@main) does it the right way: CheckedArithmetic for the offset math, finalize() returns bool, and BytecodeGenerator::generate() propagates the failure as an OOM during parsing — JavaScript just sees a RangeError.
The upstream regression test doubles as the trigger:
javascriptlet n = 44739242;
let s = 'a();'.repeat(n); // ~180 MB, ~44.7M call opcodes
let f = new Function('a', s);
f(function() { }); // vulnerable: overflow / fixed: RangeError
Each a(); emits one call opcode with a substantive metadata record. ~45M of them is enough to wrap a 32-bit offset. Our standalone page (poc/index.html) wraps this with staged beacons (building-source → compiling → calling → survived-patched) so a hosting server sees exactly how far the engine got before dying.
Setup: a vPhone guest on our device-lab (iPhone17,3, iOS 26.1 23B85 — one release line before the fix), the PoC served from the lab host bridge, Safari navigated to it via the guest's serial shell (uiopen --url).
Observed, 2026-11-05:
calling — the engine never returned from f().ExcUserFault_MobileSafari-2026-11-05-053730.ips — bug_type 308, EXC_GUARD (GUARD_TYPE_USER) with termination namespace WEBKIT. The renderer exceeded its resource guard; MobileSafari went down with it.
Left: the PoC open in Safari on iOS 26.1 (served from the device-lab host, 192.168.64.1) — the page reaches “arming” before the engine stops responding. Right: with the WebContent renderer killed (EXC_GUARD, WEBKIT namespace), Safari drops to a blank black screen — iOS contained the crash to the app, and the device kept running.
Same page, desktop Safari on macOS 26.6.1: the ~180 MB source plus the bytecode and metadata explosion drove the system into terminal memory pressure. watchdogd stopped checking in; 91 seconds later the kernel fired a watchdog-timeout panic (bug_type 210) and the Mac rebooted. The panic backtrace is all memorystatus, jetsamCoalition, pageout_* — resource exhaustion, not kernel memory corruption.
Moments before the panic: macOS warns “Your system has run out of application memory” as the ~180 MB source and the bytecode/metadata explosion exhaust RAM.
The aftermath: the macOS Problem Report — “Your computer was restarted because of a problem” — carrying the panic line watchdog timeout: no checkins from watchdogd in 91 seconds.
One page. On iOS it kills Safari. On macOS it reboots the machine.
This bug class — 32-bit offset arithmetic over attacker-scalable counts — is one of the most reliable patterns in engine fuzzing:
Fuzzers find these when they generate extreme scale, not just extreme values. Your corpus should include “millions of a normal thing”, not only “weird bytes”. It's the same family as the ImageIO integer overflows we've covered before — just inside the JS engine's parser instead of an image decoder.
JSTests/stress/unlinked-metadata-table-finalize-overflow.js