On Wed, May 23, 2018 at 08:59:06PM -0400, Theodore Y. Ts'o wrote: > On Thu, May 24, 2018 at 10:49:31AM +1000, Dave Chinner wrote: > > > > We've learnt this lesson the hard way over and over again: don't > > parse untrusted input in privileged contexts. How many times do we > > have to make the same mistakes before people start to learn from > > them? > > Good question. For how many years (or is it decades, now) has Fedora > auto-mounted USB sticks? :-) Let me know when you successfully get > Fedora to turn of a feature which appears to have great user appeal. They'll do that when we provide them with a safe, easy to use solution to the problem. This is our problem to solve, not blame-shift it away. > And I'll note that Eric Beiderman just posted a patch series allowing > unprivileged processes to mount file systems in containers. Yup, that's to make it easy for virtual kernel filesystems to be mounted inside containers, and to solve some of FUSEs security issues caused by needing root permissions to mount FUSE filesystems. Enabling unprivileged mounts requires an opt-in flag in the filesystem fs-type definition, and we most certainly won't be setting that flag on XFS. I also doubt it will ever get set on any other existing block device based filesystem because of the trust model problems it exposes. > And remember the mantra which the containner people keep chanting. > Containers are just as secure as VM's. Hahahaha..... So your solution is to have VM guests and container users spin up sandboxed VMs to access filesystem images safely? That's not really a practical solution. :/ > > User automounting of removable storage should be done via a > > privilege separation mechanism and hence avoid this whole class of > > security problems. We can get this separation by using FUSE in these > > situations, right? > > FUSE is a pretty terrible security boundary. That may be true, but it's so much better than using the kernel to parse untrusted filesystem metadata. > And not all file systems > have FUSE support. Except there is now fusefs-lkl, so all kernel filesystem are fully accessible through FUSE. > > Bugs don't have to be exploitable to be a "security issue". Detected > > filesystem corruptions on a errors=panic mount, or undetected > > problems that cause a x/NULL deref are still a user-triggerable > > kernel crash (i.e. a DOS) and therefore considered a security > > problem. > > I disagree here. I think it's worth it to disambiguate the two. Been trying to get security people to understand this for years. I've given up because there's always some new security person who follows The Process and simply does not understand that there is a difference. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html