News for hackers. Stuff that matters.
Re:Apps? No root? Your device serves others, warns Berners-Lee by api on Friday February 01, 2013 @04:15PM (#5153536)
It's a terrible trend, but I don't see it as some kind of conspiracy as some people seem to. It's a legitimate market trend being driven by several factors:

(1) Operating systems have an outmoded security model. Most focus on multi-user security, which still has its uses, but they fail to focus on application isolation. Applications should be installable by anyone and isolated completely from other apps unless specifically granted permission by a user/administrator. The entire malware problem can be laid at the feet of this.

(2) The (related) poor state of installability. Mac has this problem the least with drag-and-drop .app installation, though sometimes even that can be confusing (and .dmg packages are weird beasts... why?). Linux has .rpm or .deb, which applies a massive and complex band-aid to the otherwise awful state of installability on that platform. Windows is absolutely horrible... it's like Linux where you have "installers" that have to do package management instead of a formal package system.

The open source world -- and even commercial vendors that want to keep the PC alive -- have to either address this problem or accept the dominion of the locked-down vendor-controlled consumer compute device. This will require abandoning the old fashioned Unix design philosophy (and the similar way Windows works) and thinking seriously about the problems of installability and isolation. It would be worth taking cues from iOS and Android here, though there's also a lot of room for new ideas.

Oh, and I forgot to mention. If we don't address these problems, all app vendors will pay a ~30% per-sale tax to Apple, Google, and Microsoft in exchange for the valuable service of a platform that provides installability and application isolation. And you know what? The market will pay it, because for most users those things are that valuable.

Point, click, install, with no fear of damaging my system. If I don't like it I click and uninstall. Anything else is completely broken.

It's interesting to note that the prevalence of virtualization is also a sign of the failure of operating systems. OSes in a box (whether via complex container overlays like OpenVZ/Virtuozzo or hypervisors) are an ugly hack to fix the fact that the OS security model is broken even for multi-user operation. The fact that everything requires root to install is the deepest issue, along with the lack of permission structures for things like network interfaces. It should be possible to run an OS and sell accounts to the general public, not VMs, and people should be able to run whatever they want from their local account and this should be safe. The fact that this isn't viable is because OSes are broken, thus we have the huge overhead of virtualization as an ugly band-aid to fix it.

Re:Apps? No root? Your device serves others, warns Berners-Lee by rogerbinns on Friday February 01, 2013 @07:21PM (#5154442)
> Most focus on multi-user security, which still has its uses, but they fail to focus on application isolation. Applications should be installable by anyone and isolated completely from other apps unless specifically granted permission by a user/administrator.

Incidentally this is exactly what Android does. They provide the isolation by creating a new user account for each app and by default apps get no permissions. The permissions you accept at install time then allow extra access. (Behind the scenes there are also mechanisms to provide security permissions across processes so that a second process doing work on behalf of your process is limited to your processes permissions.) Multiple problems have happened.

The initial default permissions in Android 1.0 were a little too permissive and for example allowed reading from the sdcard. While that seemed harmless at the time, it was in retrospect a bad choice.

There is no hard validity checker. For example if an application ignores the API call to find the location of the sdcard and instead just uses /sdcard then no one would know. This means that it is very easy for apps to not comply with best practises to be available, the developers don't even know it, and the platform has problems if they want to fix the issues due to the large installed base. (If Angry Birds stopped working because they hard coded things instead of using APIs would Android or Rovio get blamed?)

Android also made a decision that you either accept an app and its permissions, or not install it. There are good arguments both ways of only allowing them as a whole or being able to disable some permissions. But the net effect is that many apps have more permissions than they do use, and have to declare them if there is any chance they could be used. Users can choose to not install apps with too many permissions, but you can't leave a review explaining that. I see a lot more pushback over permissions in app store reviews these days, but the many years of prior practise mean far too many apps have too many permissions. (BlackBerry had this scheme where for each permission you could set it to grant, deny or ask on each use. For the tech crowd it is great, but for someone who just wants to play a game it is annoying and probably not helpful.)

The permissions themselves are not sufficiently granular - for example "Internet" is on or off. An email app contacting my email server is great, but contacting a command and control server in another country is a huge problem. Of course some sort of per connection prompting could happen, but isn't really practical for the vast majority of users.

Commercial issues have a been a problem too. For example the Google Play Store is not available in China (and many other countries). Consequently users have to use a different store, and some have different incentives as app stores are not lucrative.

Finally we have the "fragmentation" issue. Google did not implement Android in such a way that the majority of core could be upgraded by Google. Consequently you end up with full stack releases which depend on manufacturers and carriers deploying after they have already sold a device - something they have no incentive to do. This would need to be solved by aligning incentives, and is hard.

TLDR: the hard stuff is hard. Application isolation is already done by all the mobile operating systems. It is the nitty gritty details beyond that that need solving.

Re:Apps? No root? Your device serves others, warns Berners-Lee by api on Friday February 01, 2013 @08:36PM (#5154731)
Interesting. Wasn't familiar with the deep details, though I knew Android did something like this.

I don't like the user-account-per-app paradigm. It seems like an ugly abuse of multi-user access control to compensate for the missing app isolation piece.

I agree that it's a hard problem.

Re:Apps? No root? Your device serves others, warns Berners-Lee by kevb on Friday February 01, 2013 @10:10PM (#5154974)
If we ignore the word "user" it feels (and is) a lot less like abuse and actually fits very well. Linux has a proven and secure method of isolating access, and on linux servers and linux on the desktop this is used by different users to protect them from each other (intentional or accidental). In Android it's more important to isolate access between apps, again protecting them from each other, intentional or accidental. Even for well intentioned apps, like Chrome or Flash, that kind of secure isolation is extremely desirable, and I don't see much value in a custom built sandbox over reusing the isolation that's already proven.
Re:Apps? No root? Your device serves others, warns Berners-Lee by pi18n on Saturday February 02, 2013 @06:14AM (#5155759)
Per-application permissions, sandboxing applications, and one-click installs are great for the users. I'd like to have a filesystem like Plan 9's, where an app cannot even see outside of its box unless I let it. But for some apps I'd like to let it.

Preventing an app from opening other apps or arbitrary files if the user desires is awful for the users. Siloing data so that a user cannot use an arbitrary application to read a PDF is awful for the users. One-click installs and refusing to run unsigned apps is awful for the users when the only CA is Apple or Microsoft.

All of the current systems are poorly implemented. They could either be a step forward or two steps back. I'm not sure of the direction they are taking yet.

Re:Apps? No root? Your device serves others, warns Berners-Lee by silentOpen on Friday February 01, 2013 @04:54PM (#5153740)
What about hypervisor as microkernel and VM as app? Is this a viable new model for system security?
Re:Apps? No root? Your device serves others, warns Berners-Lee by hexonexxon on Friday February 01, 2013 @07:32PM (#5154486)
They do not provide real isolation only the illusion of isolation.

Remember software engineers have been stamping out bugs in the x86/64 arch for decades and they still find new bugs all the time. ARM arch is no different, they'll be stamping out bugs for decades too. By adding a hypervisor and virtual machines you're layering a whole new set of bugs on top like a bug sandwich. Complexity skyrockets, security is the first casualty.

As for not having root on a proprietary device it's a double edged sword. On one hand you're firmly in the land of feudal security leaving everything up to the developers, on the other hand if you root the device you're now opening up priv escalation and NFC exploits galore.

Re:Apps? No root? Your device serves others, warns Berners-Lee by vy8vWJlco on Friday February 01, 2013 @05:15PM (#5153869)
A process is basically a lightweight VM instance.
Re:Apps? No root? Your device serves others, warns Berners-Lee by silentOpen on Friday February 01, 2013 @06:04PM (#5154144)
You mean a VM instance is a lightweight process? With hardware-assisted virtualization, multiple cores, and no preemption, shouldn't an OS-less VM be lighter than a general-purpose kernel-scheduled process?
Re:Apps? No root? Your device serves others, warns Berners-Lee by vy8vWJlco on Friday February 01, 2013 @06:37PM (#5154274)
Lighter how? A VM and a process look almost the same from the running software's point of view. A process is basically the same as it was in DOS - one big memory space, except some memory regions are off limits, and some regions contain kernel trampolines (assembly is still fair game). QEMU/KVM just hooks basic things like MMU/page lookups, and interrupts (using CPU extensions, iff available), so hardware interfaces (ex, PCI) can be simulated, but otherwise the VM runs as a normal process using the kernel's scheduler. Xen just re-implements some of the scheduler stuff on the theory that not everyone needs the full kernel. Unless CPUs start incorporating scheduling (preemption of processes/VMs) and memory-space isolation and kernel interfaces (like fork, and k/exec), I'm not entirely sure what an "OS-less VM" might look like. (It would be great if half the kernel - ex, the Xen part - could be BIOS/CoreBoot-level firmware though, as it'd be nice to just use kernel drivers and common scripts to boot, etc, rather than Grub-specific or iPXE-specific ones, etc...)
Re:Apps? No root? Your device serves others, warns Berners-Lee by api on Friday February 01, 2013 @05:27PM (#5153924)
It's feasible, but I personally think the hypervisor overhead stinks. Better to fix to OS permission model.
Re:Apps? No root? Your device serves others, warns Berners-Lee by vy8vWJlco on Friday February 01, 2013 @05:33PM (#5153955)
Why not use filesystem permissions/ACLs on named pipes to access native interfaces (as a poor-man's microkernel)?
Re:Apps? No root? Your device serves others, warns Berners-Lee by silentOpen on Friday February 01, 2013 @06:03PM (#5154134)
Hypervisor overhead for hardware-assisted virtualization is worse than OS-level preemptive threading? Why bother with an OS at all and just run mobile apps in a hypervisor with system service ACLs?
Re:Apps? No root? Your device serves others, warns Berners-Lee by mempko on Saturday February 02, 2013 @01:00AM (#5155341)
As people require a license and training to drive a car, I feel that people should require training (free of course) to use a computer. The whole problem with computers is that they are tools for consumption AND creation. While these new tablets and phones are heavily consumption only. The problem with computers is not that they are complicated, but because most of society has zero competency in using these powerful tools. It is a failure of education.

So we end up with shitty phones and tablets that try to make consuming old media easier, instead of users making their own media and applications.

Re:Apps? No root? Your device serves others, warns Berners-Lee by superasn on Sunday February 03, 2013 @07:36AM (#5159483)
>Applications should be installable by anyone and isolated completely from other apps unless specifically granted permission by a user/administrator.

There is also the Sandboxie approach to installing apps.

Once installed the OS monitors the app (and any spawned processes) for any and all changes it makes to the OS and once closed the settings are reverted (except local settings). When uninstalled any files/settings/etc it changed are also reverted by the OS instead of the uninstaller.

[1] http://www.sandboxie.com/

Re:Apps? No root? Your device serves others, warns Berners-Lee by BerislavLopac on Saturday February 02, 2013 @07:01AM (#5155823)
Re:Apps? No root? Your device serves others, warns Berners-Lee by InclinedPlane on Friday February 01, 2013 @05:14PM (#5153859)
These features are hardly inseparable from being denied root access to the device.
Re:Apps? No root? Your device serves others, warns Berners-Lee by api on Friday February 01, 2013 @05:26PM (#5153918)
That's not true. Root access can be permitted to the user. It just should not be permitted to apps without specific permissions and it should not be required to install an app. Apps should not have to vomit all over the filesystem. They should be self-contained and run in isolation.
Re:Apps? No root? Your device serves others, warns Berners-Lee by pi18n on Saturday February 02, 2013 @06:20AM (#5155766)
This is absolutely correct. Apps should be completely isolated by default but users should be allowed to add access to other resources on a per-resource basis.