Hacker News new | ask | show | jobs
by kryptiskt 988 days ago
Decidability has very practical applications. There have been a number of security exploits that have depended on the attacker being able to run a weird machine inside a decoder of some kind, like NSO's iPhone hack:

https://googleprojectzero.blogspot.com/2021/12/a-deep-dive-i...

"JBIG2 doesn't have scripting capabilities, but when combined with a vulnerability, it does have the ability to emulate circuits of arbitrary logic gates operating on arbitrary memory. So why not just use that to build your own computer architecture and script that!? That's exactly what this exploit does. Using over 70,000 segment commands defining logical bit operations, they define a small computer architecture with features such as registers and a full 64-bit adder and comparator which they use to search memory and perform arithmetic operations. It's not as fast as Javascript, but it's fundamentally computationally equivalent.

The bootstrapping operations for the sandbox escape exploit are written to run on this logic circuit and the whole thing runs in this weird, emulated environment created out of a single decompression pass through a JBIG2 stream. It's pretty incredible, and at the same time, pretty terrifying."