2 ms·
Apple's own code also implements all the security of the device. The mechanism Apple has to run arbitrary untrusted code on the device is their JavaScript engin
by Spivak 4y ago
Apple's own code also implements all the security of the device. The mechanism Apple has to run arbitrary untrusted code on the device is their JavaScript engine. Whatever you want to replace JSC with, like V8, isn't the thing that's constrained by the sandbox, it's the thing that implements the sandbox.
Everyone who's like "just sandbox it" -- yeah that's exactly what JSC is for.
- postalrat 4y agoWhat protects an ios user from a malicious app? Just the agreement the app developer made with apple?
- Spivak 4y agoSorta kinda, iOS apps are jailed using all the normal stuff you might find in a hardened Linux distribution but there isn't a system in the whole wide world that is confident that these kinds of jails are sufficient to safely run arbitrary untrusted code. This is half the reason Firecracker exists on Linux because containerization just isn't enough. Hence why it's only allowed to run actually sandboxed in the JavaScript VM and even then the JIT makes it not airtight. This is how past Jailbreak exploits worked. Like we're talking about code running in a VM completely isolated from the host system but has one teeeeny tiny escape hatch, a single WX page used by the JIT and that has been exploited multiple times.