10 ms·
TL;DR: Android is trying to enforce all data being either writable, or executable, never both. iOS already does this. There are big security benefits (it b
by londons_explore 6y ago
TL;DR: Android is trying to enforce all data being either writable, or executable, never both. iOS already does this. There are big security benefits (it becomes much harder to exploit an app).
A disadvantage is it becomes much harder to make things like terminal emulators and things that want to download random code and run it.
But those are by far the minority of apps, and it seems crazy to make a pretty massive security tradeoff for something that 99% of apps don't need to do.
One solution might be a special permission to be allowed to do that, but it seems unlikely a user could really make an informed decision.
Another solution could be to interpret rather than execute the code - you lose a lot of performance, but for people running bash scripts, that might not matter. Using WebAssembly might be a good middle ground.
- fxj 6y agoHow is ish on iOS circumventing it?
- londons_explore 6y agoit interprets x86, and therefore loses a lot of performance. For just running a few bash scripts, it really doesn't matter tho.
- yoz-y 6y agoThis, plus the App Store version does not come with apk package manager so in theory all executable code is there. Also they are on a kind of thin ice and already almost have been kicked out: https://ish.app/blog/app-store-removal https://ish.app/blog/app-store-removal
- lxgr 6y agoBy the way, UserLAnd [1] does something very similar on Android (and is accordingly not affected by these changes). [1] https://github.com/CypherpunkArmory/UserLAnd https://github.com/CypherpunkArmory/UserLAnd
- bitwize 6y agoFunny, all the binaries in my UserLAnd are aarch64, not x86. I'm not sure how they do it -- faking syscalls? -- but recently, changes in Android filesystem access policies made it impossible to move files between UserLAnd and the outside Android environment.
- lxgr 6y agoSorry, my comment was a bit misleading – it doesn't seem to use emulation, only syscall translation of some kind. iSH does both. For that matter, I'm actually not aware why UserLAnd's approach is compliant with the minimum API level required for the Play store but Termux isn't. I always thought the point of contention was exec()'ing executables not delivered through the store, which both of them can clearly do. Update: It seems like UserLAnd just hasn't been updated in a while, and the API level requirement is apparently not enforced for existing apps in the store.
- ddevault 6y agoThis reminds me of the Harvard architecture: https://en.wikipedia.org/wiki/Harvard_architecture https://en.wikipedia.org/wiki/Harvard_architecture Perhaps most familiar to the typical HN reader via Arduinos, and contrasted with von Neumann: https://en.wikipedia.org/wiki/Von_Neumann_architecture https://en.wikipedia.org/wiki/Von_Neumann_architecture And anyone who has tried to make any kind of interesting general-purpose system on a Harvard design will tell you that it's not really practical.
- angry_octet 6y agoExcept for the many CPUs with separate instruction and data caches, i.e. Harvard architecture L1, von Neumann main memory. https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/caches-and-self-modifying-code https://community.arm.com/developer/ip-products/processors/b...
- jimktrains2 6y agoThat's not really the same thing though. Those are just different caches of RAM. There's nothing really special about them.
- angry_octet 6y agoIt's exactly Harvard. Instructions can only be loaded from the I cache, and data operands from the D cache. If you JIT something you have to flush the relevant D cache entries and invalidate the relevant I cache and then it will get reloaded.
- jimktrains2 6y agoIt appears this is called a modified Harvard architecture. I wasn't aware of that. https://en.m.wikipedia.org/wiki/Harvard_architecture https://en.m.wikipedia.org/wiki/Harvard_architecture https://en.m.wikipedia.org/wiki/Modified_Harvard_architecture https://en.m.wikipedia.org/wiki/Modified_Harvard_architectur...
- forgotmypw17 6y ago>But those are by far the minority of apps, and it seems crazy to make a pretty massive security tradeoff for something that 99% of apps don't need to do. It also completely eliminates general purpose computing. >One solution might be a special permission to be allowed to do that, but it seems unlikely a user could really make an informed decision. I think the way "Developer Mode" on Android is implemented is pretty good.
- shawnz 6y agoWhile I agree the current situation does hinder some general purpose computing use cases on Android, it is still possible to run any code you want. If they can develop easier methods for developers to design around the restrictions then that might be a fine solution. > I think the way "Developer Mode" on Android is implemented is pretty good. Assuming you meant Chrome OS here, I disagree. Developer mode sucks because it forces you to forego almost all system security and it makes it trivial to compromise your data. There needs to be a middle ground, not just dev mode. In my opinion there's a similar situation happening with SIP on Mac OS -- it's too drastic to disable, but there's in many cases not enough control to leave it enabled. Nobody should need to enable dev mode or disable SIP just to run their favorite apps.
- forgotmypw17 6y agoNo, I was talking about Android, not Chrome OS. And I was talking about the obscurity level of accessing the developer mode, because you said was hard to achieve a good balance between "too difficult" and "too easy to be tricked into".
- UncleMeat 6y ago> It also completely eliminates general purpose computing. The number of people who want general purpose computing on phones is vanishingly small. And since malware is often indistinguishable from general purpose computing, it can be a reasonable product choice.
- amelius 6y ago
- vorpalhex 6y ago> But those are by far the minority of apps, and it seems crazy to make a pretty massive security tradeoff for something that 99% of apps don't need to do. Yet oddly, I as the user who paid $550 for my device would like to do that. I understand wanting to put a warning on it, but otherwise my device can kindly screw off and do what I've told it to do, or it will be taking a one way ride out the nearest window. The device serves me, not the other way around.
- mPReDiToR 6y agoTo play devil's advocate only: If Bob paid $COST for a phone and it got exploited because of this, Bob may throw his phone out of the nearest window. Do you think there are more Bobs than you in the world? Personally, I find this reliance on the GOOG OS awful, but most of it was overcome with Xposed last time I ran LineageOS. I tried Cydia last time I ran IOS and that was worse. I've thrown several phones out of the window (metaphorically) and am waiting on my PinePhone being delivered because I believe in their goals. It sucks that everything in life seems to come down to Coke or Pepsi choices, or Vi/Emacs. Big corps aren't the answer. They monopolise and stifle, giving twoshit sandwiches for consumers to take a bite of.
- vorpalhex 6y ago> If Bob paid $COST for a phone and it got exploited because of this, Bob may throw his phone out of the nearest window. You and I both know, despite many attempts, there is no hardware or software out there that is unexploitable. From the most locked down chromebook to Apple's walled garden, these devices can and are exploited. The idea that if somehow we take away enough of your freedom we'll make the device safe is basically a bald faced lie. Not once in the history of computing has it worked out. Even my internet connected lightbulbs which literally have only an on and an off exposed are exploitable. No amount of removing user freedom will make users safer. This isn't a rocket surgery level conclusion, which means companies that continue pressing down this road probably have some other reason for doing so.
- jjuel 6y ago
- saagarjha 6y agoW^X is not a security protection on iOS, it serves to enforce the integrity of App Review. Apple claiming that it is the only entity that can write a JIT securely both provably incorrect and belies a lack of confidence in the platform sandbox.