| Benefits for LWN subscribers The primary benefit from subscribing to LWN is helping to keep us publishing, but, beyond that, subscribers get immediate access to all site content and access to a number of extra site features. Please sign up today! |
As of this writing, 5,392 non-merge changesets have been pulled into the mainline repository for the 4.17 release. The 4.17 merge window is thus off to a good start, but it is far from complete. The changes pulled thus far cover a wide part of the core kernel as well as the networking, driver, and filesystem subsystems.
Some of the more significant changes merged so far are:
Miscellaneous
If this turns out to be a normal two-week merge window, it can be expected
to remain open until April 15, with the final 4.17 release happening
in early June. The remainder of the changes merged for this release will
be summarized once the merge window closes.
| Index entries for this article | |
|---|---|
| Kernel | Releases/4.17 |
The first half of the 4.17 merge window
Posted Apr 6, 2018 10:09 UTC (Fri) by grawity (subscriber, #80596) [Link]
Maintainer Ted Ts'o warns "I still don't recommend that container folks hold any delusions that mounting arbitrary images that can be crafted by malicious attackers should be considered sane thing to do, though!"
So in other words, it's okay if Linux has even bigger security holes than Windows' much-derided autorun.inf, because the user is to blame if they don't epoxy their USB ports and someone connects a malicious ext4 USB stick.
The first half of the 4.17 merge window
Posted Apr 6, 2018 11:26 UTC (Fri) by knan (subscriber, #3940) [Link]
The first half of the 4.17 merge window
Posted Apr 6, 2018 14:24 UTC (Fri) by sorokin (subscriber, #88478) [Link]
I mean as a programmer I realize that it is extremely difficult to handle all corner cases for what can be written on disk in the place of the file-system data structures. But what about flash drives or CD-images? They are widely used. Can we have at least one filesystem, say FAT or ISO-9660, that can be used for untrusted media? Sounds like a good application for fuzz-testing.
The worst thing is when an attacker can make its own device. The rogue disk can alter the data while the disk is being used. Who knows what kind of confusion this can create when kernel works with this disk.
The first half of the 4.17 merge window
Posted Apr 7, 2018 15:40 UTC (Sat) by hmh (subscriber, #3838) [Link]
However, if you want to not trust ACLs, owners, modes, device inodes, etc. then you are to mount the filesystem with the proper options. It is userspace's responsibility.
User-mounted Vfat, udf and iso filesystems are usually handled as unsafe well enough. Ext, btrfs, xfs... it depends. Again, for the better or for the worse, it is on userspace to select the appropriate mount policy.
And the kernel does allow per-usb-port activation control, including whitelist-based. Again, you need userspace to set this policy...
The first half of the 4.17 merge window
Posted Apr 6, 2018 15:00 UTC (Fri) by ebiederm (subscriber, #35028) [Link]
The problem is that ext4 is a large code base and on the disk side has a large attack surface and was never built
to withstand attack from a malicious block device. Given how long I have been working on issues so that fuse
(which was built to be safe) is actually safe to mount unprivileged I expect it will take years of work before
there is confidence that ext4 has no exploitable holes if used on a malicious block device.
For dealing with the issue I recommend using fuse and running your filesystem drivers in userspace for
dealing with untrusted/external media.
The first half of the 4.17 merge window
Posted Apr 6, 2018 15:18 UTC (Fri) by epa (subscriber, #39769) [Link]
The first half of the 4.17 merge window
Posted Apr 6, 2018 15:54 UTC (Fri) by pizza (subscriber, #46) [Link]
The first half of the 4.17 merge window
Posted Apr 6, 2018 16:49 UTC (Fri) by droundy (subscriber, #4559) [Link]
The first half of the 4.17 merge window
Posted Apr 6, 2018 17:20 UTC (Fri) by k8to (subscriber, #15413) [Link]
Specialized devices without a traditional user interface might have to get a little creative, of course.
Automounting
Posted Apr 6, 2018 21:36 UTC (Fri) by corbet (editor, #1) [Link]
In fact, some of us turn off the "helpful" desktop code that wants to just go ahead and mount anything that shows up. Automatic mounting is not an inherent Linux feature.
Automounting
Posted Apr 8, 2018 0:05 UTC (Sun) by k8to (subscriber, #15413) [Link]
The first half of the 4.17 merge window
Posted Apr 7, 2018 7:11 UTC (Sat) by karkhaz (✭ supporter ✭, #99844) [Link]
Where does this functionality come from? It's certainly not the kernel that does this. Maybe distributions patch it in, or maybe some of the more heavyweight desktop environments do this on the user's behalf by default?
The first half of the 4.17 merge window
Posted Apr 7, 2018 13:30 UTC (Sat) by pizza (subscriber, #46) [Link]
The latter, working in combination with the likes of udisks to detect the media and muck with permissions so that the user can do anything with it.
At least in GNOME's case, it's also completely configurable, including being able to disable it entirely.
The first half of the 4.17 merge window
Posted Apr 8, 2018 12:10 UTC (Sun) by niner (subscriber, #26151) [Link]
The first half of the 4.17 merge window
Posted Apr 6, 2018 17:30 UTC (Fri) by pizza (subscriber, #46) [Link]
Granted, udisks/etc could be set up to automatically run fsck on the new filesystems prior to mounting them, but that carries its own set of risks and implications (eg a mechanism to report failures, interactive prompts to allow fixing problems, etc etc...)
Mounting an external drive
Posted Apr 6, 2018 21:42 UTC (Fri) by ebiederm (subscriber, #35028) [Link]
It definitely makes sense to wait until a user asks. Some devices present as multiple usb devices, sometimes you get confused and plug the wrong device. Waiting for the user to say mount the drive now limits nefarious actions to when a user is actively watching which is more difficult to hide.
So even with in-kernel filesystem drivers that have not been built to be robust against malicious usb sticks there are things you can do that will make an attackers life more difficult.
Mounting an external drive with FUSE
Posted Apr 7, 2018 16:03 UTC (Sat) by alison (subscriber, #63752) [Link]
I gather that mounting block devices 'noexec' is in sufficient? If the filesystem metadata is, for example, designed to create a stack overflow and 'mount' is executed as root, it's easy to see why there could be a problem.
Mounting an external drive with FUSE
Posted Apr 8, 2018 0:04 UTC (Sun) by pabs (subscriber, #43278) [Link]
https://www.phoronix.com/scan.php?page=news_item&px=I...
https://www.phoronix.com/scan.php?page=news_item&px=L...
Mounting an external drive with FUSE
Posted Apr 8, 2018 21:51 UTC (Sun) by OttoErickson (guest, #122996) [Link]
Mounting an external drive
Posted Apr 12, 2018 15:14 UTC (Thu) by bfields (subscriber, #19510) [Link]
I'd worry that the userspace driver will also get less maintenance. I guess the sandboxing could be pretty restrictive if it literally only needs access to the one device and the fuse interface? On the other hand the ability to return arbitrary data and metadata, unexpected errors, etc., could offer a lot of potential attacks against any application accessing that filesystem.
I don't know, it seems like a hard problem to me.
Every time we have this discussion I have flashbacks to some 30 years ago--weren't removable media (floppies) a primary vector for malware?
Mounting an external drive
Posted Apr 13, 2018 8:03 UTC (Fri) by lacos (subscriber, #70616) [Link]
You can also use guestfish or guestmount from the libguestfs project. Those will use kernel drivers, but the kernel will be run in a virtual machine. (In fact, guestmount is a special case of fuse.)
http://libguestfs.org/guestfs-security.1.html
http://libguestfs.org/guestfs-faq.1.html#how-does-libgues...
http://libguestfs.org/guestmount.1.html
The first half of the 4.17 merge window
Posted Apr 7, 2018 0:53 UTC (Sat) by rgmoore (✭ supporter ✭, #75) [Link]
It's not like the user will ever answer "no" to the question "do you want to access the usb stick you just plugged in?"
That isn't necessarily the case. For example, I occasionally just want to format the device I've just inserted rather than mounting it. Sure, I can just unmount it first, but I might be paranoid enough not to want to mount it at all if it came from a questionable source.
Asking the user would also help in the case of a malicious device that the user doesn't know contains storage at all. Since USB devices are designed to be chained, it's possible for a single physical USB device to contain multiple logical devices. Some devices use this for good- ISTR there are some password storage sticks that contain a virtual keyboard device so they can type passwords into the correct space on forms- but it's easy to see how it could be used for evil. If I think I've just plugged in my USB powered keyboard vacuum and my system asks me if I want to mount the disk, I'm very unlikely to click "OK".
The first half of the 4.17 merge window
Posted Apr 7, 2018 2:12 UTC (Sat) by pizza (subscriber, #46) [Link]
It is widely established that users will overwhelmingly say "yes" to any and every prompt confirming potentially risky behaviour. Usually without any conscious thought.
Especially given that the overwhelmingly common case is "Of course I want to access the files on the stick I plugged in! That's why I plugged it in!"
By all means, let's emulate Windows here, perform a quick read-only fsck upon insertion. and prompt if there's a potential problem, but no amount of filesystem-level paranoia will save the user if they click on the file labelled "hot avian pr0n.sh" and get their account (and more importantly, all the data they care about) completely compromised.
The first half of the 4.17 merge window
Posted Apr 7, 2018 12:25 UTC (Sat) by roc (subscriber, #30627) [Link]
The first half of the 4.17 merge window
Posted Apr 8, 2018 9:33 UTC (Sun) by flussence (subscriber, #85566) [Link]
Or to put it more simply: I want a PoisonTap to present *at least* the same deliberately terror-inducing UI as I currently get for a self-signed SSL cert. Because one of these things is actually dangerous.
The first half of the 4.17 merge window
Posted Apr 10, 2018 3:47 UTC (Tue) by pabs (subscriber, #43278) [Link]
https://usbguard.github.io/
https://github.com/kochstefan/usbauth-all/
The first half of the 4.17 merge window
Posted Apr 9, 2018 12:56 UTC (Mon) by cortana (subscriber, #24596) [Link]
Here's my suggestion for UI that will allow power users to confirm mounting without an annoying prompt that will turn off average users.
When you insert a disk, nautilus appears as normal (with the disk selected on the left-hand pane), but instead of the disk being mounted and the files displayed on the main pane, a prompt and button are displayed instead:
+----------------------------------------------------+ | | | | Recent | Mount the device "USB disk"? | | Home | | | Documents | [x] Remember for this disk | | Downloads | | | Music | [Mount] [Eject] | | Pictures | | | Videos | | | Wastebasket| | | | | +-USB-disk---+ | | | | | | | | | | | | | | | | | | | | | | +----------------------------------------------------+
The first half of the 4.17 merge window
Posted Apr 9, 2018 14:44 UTC (Mon) by jem (subscriber, #24231) [Link]
How do you know what the right answer (mount/eject) to the question is? If you have plugged it in, your intention was to use the disk. Why would you suddenly not want to use it after all?
The problem with removable storage is similar to running executables from an unknown source (except the storage problem is possibly worse, because the file system code is in the kernel). If the disk doesn't come from a trustworthy source, don't plug it in. Also, don't allow strangers to plug in disks at all on machines you are in charge of. I don't see the added value of asking "are you sure?"
The first half of the 4.17 merge window
Posted Apr 9, 2018 17:45 UTC (Mon) by droundy (subscriber, #4559) [Link]
The first half of the 4.17 merge window
Posted Apr 10, 2018 10:25 UTC (Tue) by matthias (subscriber, #94967) [Link]
Such a dialog would have to appear for every new device, not only mass storage. Furthermore, if you do not trust the device, you should not allow to register any component of the device. Which brings us back to square one: Why should you add a device that you do not trust? Ok, you could try to configure the keyboard (or mouse) that represents the presenter such that it can only forward inputs to the presentation software and not to some terminal or window manager. Is there anyone who really does this?
The bottom line is that you are usually doomed if you cannot trust the hardware that you are using, which is one of the reasons why Unix traditionally ultimately trusts any hardware.
The first half of the 4.17 merge window
Posted Apr 12, 2018 15:02 UTC (Thu) by bfields (subscriber, #19510) [Link]
It is widely established that users will overwhelmingly say "yes" to any and every prompt confirming potentially risky behaviour. Usually without any conscious thought."
Personally, I'm a little less sure that I'm any different from the "general populace".
After I've already clicked "yes" on a hundred of those dialogs, I'm not sure I could count on myself to click "no" on a dubious one.
The first half of the 4.17 merge window
Posted Apr 9, 2018 13:59 UTC (Mon) by bandrami (subscriber, #94229) [Link]
They did this because this is The Right Thing To Do when a new removable disk is added. This didn't need to change.
bug bounties are massively underrated
Posted Apr 19, 2018 18:46 UTC (Thu) by Garak (guest, #99377) [Link]
Ted has committed to fixing any known issues, and from what I have seen has been doing a good job with ext4. [...] I expect it will take years of work before there is confidence that ext4 has no exploitable holes if used on a malicious block device.Sounds to me like another prime job for the oft-underrated combination of bug bounties and money. If there is a recurring and large enough bug bounty for successfully malicious filesystem images, the crowd will provide, and the resulting improvement timeframe will dramatically shrink (in direct proportion to the amount of money you throw into the bug bounty pot). Seriously, make it a sport/game with enough funding. If it matters that much.
Copyright © 2018, Eklektix, Inc.
This article may be redistributed under the terms of the
Creative
Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds