LWN: Comments on "The first half of the 4.17 merge window" https://lwn.net/Articles/750928/ This is a special feed containing comments posted to the individual LWN article titled "The first half of the 4.17 merge window". en-us Sun, 05 Oct 2025 21:21:34 +0000 Sun, 05 Oct 2025 21:21:34 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net bug bounties are massively underrated https://lwn.net/Articles/752339/ https://lwn.net/Articles/752339/ Garak <blockquote>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.</blockquote> 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. Thu, 19 Apr 2018 18:46:36 +0000 Mounting an external drive https://lwn.net/Articles/751749/ https://lwn.net/Articles/751749/ lacos <div class="FormattedComment"> "For mounting the drive I would recommend running a file system driver in user space with fuse"<br> <p> 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.)<br> <p> <a href="http://libguestfs.org/guestfs-security.1.html">http://libguestfs.org/guestfs-security.1.html</a><br> <a href="http://libguestfs.org/guestfs-faq.1.html#how-does-libguestfs-compare-to-other-tools">http://libguestfs.org/guestfs-faq.1.html#how-does-libgues...</a><br> <a href="http://libguestfs.org/guestmount.1.html">http://libguestfs.org/guestmount.1.html</a><br> </div> Fri, 13 Apr 2018 08:03:38 +0000 Mounting an external drive https://lwn.net/Articles/751673/ https://lwn.net/Articles/751673/ bfields <div class="FormattedComment"> "For mounting the drive I would recommend running a file system driver in user space with fuse. I have seen fuse drivers available for most filesystems. That will be quite a bit more robust than using a kernel driver, and the exploit would be less severe. Especially if the filesystem process is sandboxed from the rest of the system."<br> <p> 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.<br> <p> I don't know, it seems like a hard problem to me.<br> <p> Every time we have this discussion I have flashbacks to some 30 years ago--weren't removable media (floppies) a primary vector for malware?<br> </div> Thu, 12 Apr 2018 15:14:34 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751672/ https://lwn.net/Articles/751672/ bfields <div class="FormattedComment"> "Folks like you and I are several sigmas beyond the mean, and it is extremely foolish to generalize our relatively-clueful paranoia onto the general populace.<br> <p> It is widely established that users will overwhelmingly say "yes" to any and every prompt confirming potentially risky behaviour. Usually without any conscious thought."<br> <p> Personally, I'm a little less sure that I'm any different from the "general populace".<br> <p> 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.<br> </div> Thu, 12 Apr 2018 15:02:13 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751394/ https://lwn.net/Articles/751394/ matthias <div class="FormattedComment"> But you are happy to allow the kernel to automatically register a USB keyboard (or mouse) that can acknowledge the mount dialog? (or type rm -rf / from time to time to annoy terminal users)<br> <p> 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?<br> <p> 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.<br> </div> Tue, 10 Apr 2018 10:25:17 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751378/ https://lwn.net/Articles/751378/ pabs <div class="FormattedComment"> Install one of these:<br> <p> <a href="https://usbguard.github.io/">https://usbguard.github.io/</a><br> <a href="https://github.com/kochstefan/usbauth-all/">https://github.com/kochstefan/usbauth-all/</a><br> </div> Tue, 10 Apr 2018 03:47:17 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751349/ https://lwn.net/Articles/751349/ droundy <div class="FormattedComment"> I think the value of asking "are you sure?" is that the user might not have intended to plug in a disk. Perhaps I would like to allow someone to charge their phone using my computer, or I want to borrow a mouse, keyboard, or remote control for giving a presentation at a conference. In none of those cases would I be happy to have the device automatically mounted.<br> </div> Mon, 09 Apr 2018 17:45:21 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751305/ https://lwn.net/Articles/751305/ jem <div class="FormattedComment"> How do you define "this disk"? Is the disk the same after being reformatted? Is it regarded different after the file system has been doctored to exploit a vulnerability?<br> <p> 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?<br> <p> 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?"<br> <p> <p> </div> Mon, 09 Apr 2018 14:44:14 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751301/ https://lwn.net/Articles/751301/ bandrami <div class="FormattedComment"> For 20 years my Linux systems did precisely nothing when I plugged in a USB drive other than register its presence with the kernel (and, later, with the in-memory device filesystem flavor of the week).<br> <p> They did this because this is The Right Thing To Do when a new removable disk is added. This didn't need to change.<br> </div> Mon, 09 Apr 2018 13:59:24 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751297/ https://lwn.net/Articles/751297/ cortana <p>Here's my suggestion for UI that will allow power users to confirm mounting without an annoying prompt that will turn off average users. <p>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: <pre> +----------------------------------------------------+ | | | | Recent | Mount the device "USB disk"? | | Home | | | Documents | [x] Remember for this disk | | Downloads | | | Music | [Mount] [Eject] | | Pictures | | | Videos | | | Wastebasket| | | | | +-USB-disk---+ | | | | | | | | | | | | | | | | | | | | | | +----------------------------------------------------+ </pre> Mon, 09 Apr 2018 12:56:17 +0000 Mounting an external drive with FUSE https://lwn.net/Articles/751263/ https://lwn.net/Articles/751263/ OttoErickson <div class="FormattedComment"> Tanenbaum would be so proud.<br> </div> Sun, 08 Apr 2018 21:51:12 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751223/ https://lwn.net/Articles/751223/ niner <div class="FormattedComment"> FWIW at least KDE requires you to actually click on "Open in File Manager" in the device notifier or on the device in the file manager to actually mount a removable device. So it behaves as you described it should do. I wonder which systems actually do mount automatically without any user participation?<br> </div> Sun, 08 Apr 2018 12:10:44 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751213/ https://lwn.net/Articles/751213/ flussence <div class="FormattedComment"> Linux hasn't exactly done better for lack of an equivalent to Windows XP's “what do you want to do with this device” autorun popup, or the infamous Have Disk prompt of despair for a hotplugged device. Sometimes I wish it did ask me before splatting a .ko into kernel memory in the background for those events; the USB authorization mechanism is already there and sits unused.<br> <p> 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.<br> </div> Sun, 08 Apr 2018 09:33:59 +0000 Automounting https://lwn.net/Articles/751204/ https://lwn.net/Articles/751204/ k8to <div class="FormattedComment"> Indeed. It was a comment on "recent" trends in Linux desktop implementations. I try to disable all of these, but sometimes I don't get full freedom to reconfigure my laptop before beginning work.<br> </div> Sun, 08 Apr 2018 00:05:24 +0000 Mounting an external drive with FUSE https://lwn.net/Articles/751203/ https://lwn.net/Articles/751203/ pabs <div class="FormattedComment"> There are at least two projects that allow the use of Linux kernel code as user-space shared libraries, perhaps they could lead to the use of Linux kernel filesystem drivers in userland via FUSE.<br> <p> <a href="https://www.phoronix.com/scan.php?page=news_item&amp;px=Intel-Kernel-Library-LKL">https://www.phoronix.com/scan.php?page=news_item&amp;px=I...</a><br> <a href="https://www.phoronix.com/scan.php?page=news_item&amp;px=Linux-Library-LibOS">https://www.phoronix.com/scan.php?page=news_item&amp;px=L...</a><br> </div> Sun, 08 Apr 2018 00:04:41 +0000 Mounting an external drive with FUSE https://lwn.net/Articles/751196/ https://lwn.net/Articles/751196/ alison <div class="FormattedComment"> What is the best way to mount a ext4- or FAT-formatted USB stick with FUSE? 'man mount' and 'man fuse' offer few clues, as does /etc/fuse.conf. 'mount -t fuse /dev/sdc1 /mnt' doesn't work.<br> <p> 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.<br> </div> Sat, 07 Apr 2018 16:03:41 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751197/ https://lwn.net/Articles/751197/ hmh <div class="FormattedComment"> Bugs are fixed when found, and actively fuzzed for. This covers untrusted data as in corrupted-on-purpose filesystem images. It is still a large surface where bugs can stay undetected for quite a while when one is not lucky.<br> <p> 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.<br> <p> 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.<br> <p> And the kernel does allow per-usb-port activation control, including whitelist-based. Again, you need userspace to set this policy...<br> </div> Sat, 07 Apr 2018 15:40:47 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751189/ https://lwn.net/Articles/751189/ pizza <div class="FormattedComment"> <font class="QuotedText">&gt; 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?</font><br> <p> 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.<br> <p> At least in GNOME's case, it's also completely configurable, including being able to disable it entirely.<br> <p> </div> Sat, 07 Apr 2018 13:30:46 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751187/ https://lwn.net/Articles/751187/ roc <div class="FormattedComment"> One underlying cause of the slow pace of Linux desktop adoption, which you can see in the comments in this article, is that many Linux users and contributors don't much care whether desktop Linux is usable by "the general populace".<br> </div> Sat, 07 Apr 2018 12:25:21 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751175/ https://lwn.net/Articles/751175/ karkhaz <div class="FormattedComment"> The idea that filesystems are always auto-mounted is totally new to me, none of the laptops or workstation that I own do this. I don't think I did anything special to prevent it, either.<br> <p> 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?<br> </div> Sat, 07 Apr 2018 07:11:36 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751174/ https://lwn.net/Articles/751174/ pizza <div class="FormattedComment"> Folks like you and I are several sigmas beyond the mean, and it is extremely foolish to generalize our relatively-clueful paranoia onto the general populace.<br> <p> It is widely established that users will overwhelmingly say "yes" to any and every prompt confirming potentially risky behaviour. Usually without any conscious thought.<br> <p> 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!"<br> <p> 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.<br> </div> Sat, 07 Apr 2018 02:12:51 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751172/ https://lwn.net/Articles/751172/ rgmoore <blockquote> 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?"</blockquote> <p>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. <p>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". Sat, 07 Apr 2018 00:53:24 +0000 Mounting an external drive https://lwn.net/Articles/751164/ https://lwn.net/Articles/751164/ ebiederm <div class="FormattedComment"> For mounting the drive I would recommend running a file system driver in user space with fuse. I have seen fuse drivers available for most filesystems. That will be quite a bit more robust than using a kernel driver, and the exploit would be less severt. Especially if the filesystem process is sandboxed from the rest of the system.<br> <p> 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.<br> <p> 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.<br> <p> </div> Fri, 06 Apr 2018 21:42:19 +0000 Automounting https://lwn.net/Articles/751166/ https://lwn.net/Articles/751166/ corbet 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. Fri, 06 Apr 2018 21:36:26 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751157/ https://lwn.net/Articles/751157/ pizza <div class="FormattedComment"> Okay, that's fair, but what exactly is udisks/etc supposed to do instead of mounting the drive? 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?"<br> <p> 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...)<br> <p> <p> </div> Fri, 06 Apr 2018 17:30:35 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751156/ https://lwn.net/Articles/751156/ k8to <div class="FormattedComment"> I'd be perfectly happy with the system as a whole simply never mounting a filesystem without explicit user authorization.<br> Some kind of fstab entry is reasonable for stable filesystems as an indication of authorization, but for random USB insertions, why not ask the live user if it's OK to mount?<br> <p> Specialized devices without a traditional user interface might have to get a little creative, of course.<br> </div> Fri, 06 Apr 2018 17:20:55 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751154/ https://lwn.net/Articles/751154/ droundy <div class="FormattedComment"> True, but the software that decides to automatically mount a USB stick or DVD when it is inserted knows that this is an external device.<br> </div> Fri, 06 Apr 2018 16:49:35 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751151/ https://lwn.net/Articles/751151/ pizza <div class="FormattedComment"> For most block devices, the "removable/not-removable" distinction is purely mechanical in nature, and not something that software has any hope of determining.<br> </div> Fri, 06 Apr 2018 15:54:43 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751149/ https://lwn.net/Articles/751149/ epa <div class="FormattedComment"> I guess some filesystems should by default be disabled for removable devices. <br> </div> Fri, 06 Apr 2018 15:18:34 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751147/ https://lwn.net/Articles/751147/ ebiederm <div class="FormattedComment"> Ted has committed to fixing any known issues, and from what I have seen has been doing a good job with ext4.<br> <p> The problem is that ext4 is a large code base and on the disk side has a large attack surface and was never built<br> to withstand attack from a malicious block device. Given how long I have been working on issues so that fuse<br> (which was built to be safe) is actually safe to mount unprivileged I expect it will take years of work before<br> there is confidence that ext4 has no exploitable holes if used on a malicious block device.<br> <p> For dealing with the issue I recommend using fuse and running your filesystem drivers in userspace for<br> dealing with untrusted/external media. <br> <p> </div> Fri, 06 Apr 2018 15:00:19 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751113/ https://lwn.net/Articles/751113/ sorokin <div class="FormattedComment"> When I was told that all mounted drives are considered trusted by Linux file-system developers I was surprised. This was a few years ago and it still amazes me. I would say that calling grawity a troll is a bit unjustified. The fact that kernel can be broken with a disk image is very unintuitive and unexpected.<br> <p> 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.<br> <p> 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.<br> <p> </div> Fri, 06 Apr 2018 14:24:35 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751100/ https://lwn.net/Articles/751100/ knan <div class="FormattedComment"> Troll somewhere else, or fix it yourself.<br> </div> Fri, 06 Apr 2018 11:26:46 +0000 The first half of the 4.17 merge window https://lwn.net/Articles/751095/ https://lwn.net/Articles/751095/ grawity <blockquote><p>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!"</p></blockquote> <p>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.</p> Fri, 06 Apr 2018 10:09:13 +0000