News for hackers. Stuff that matters.
Re:Control-Flow Integrity in V8 by Waterluvian on Monday October 09, 2023 @01:30PM (#37822913)
“V8 exploits typically follow a similar pattern: an initial bug leads to memory corruption…”

naturally gets me wondering about Firefox and Rust. Is it measurably helping eliminate this class of issue? Too soon to tell?

Re:Control-Flow Integrity in V8 by treyd on Monday October 09, 2023 @02:05PM (#37823287)
With jitting runtimes like V8 often the root cause of the exploit is a logical error in code generation that leads to the sandboxed code to get a read/write gadget into memory outside the sandbox. Rewriting the jit in Rust might help eliminate those kinds of issues, but it's still entirely possible they would happen.
Re:Control-Flow Integrity in V8 by hovav on Monday October 09, 2023 @04:00PM (#37824752)
A JIT is a machine for turning logic bugs into memory unsafety. Rewriting a JIT in Rust won't eliminate logic bugs and won't guarantee memory safety for the binary output of the JIT (as distinct from the JIT implementation itself).
Re:Control-Flow Integrity in V8 by infogulch on Monday October 09, 2023 @04:06PM (#37824822)
Agreed. But the way you put it makes me wonder how many memory safety vulns have been found in JIT implementations (not the machine code they output).
Re:Control-Flow Integrity in V8 by nextaccountic on Monday October 09, 2023 @05:25PM (#37825716)
Okay, but in this case software verification like with Coq or F* could help
Re:Control-Flow Integrity in V8 by hovav on Monday October 09, 2023 @06:43PM (#37826374)
Yes! See, e.g., Fraser Brown et al., "Towards a Verified Range Analysis for JavaScript JITs," in proc. PLDI 2020, https://www.cs.utexas.edu/~hovav/dist/vera.pdf
Re:Control-Flow Integrity in V8 by paulddraper on Monday October 09, 2023 @05:06PM (#37825480)
> Is it measurably helping eliminate this class of issue?

No.

A JIT is a compiler.

The compiler itself would be memory-safe, but not the compiled output.

Re:Control-Flow Integrity in V8 by kevingadd on Monday October 09, 2023 @05:15PM (#37825586)
The JS runtime and JIT are still entirely C++ and assembly, afaik. I'm not sure we'd ever see them migrate Spidermonkey to Rust.