]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - scrub/Makefile
xfsprogs: don't allow udisks to automount XFS filesystems with no prompt
authorDarrick J. Wong <djwong@kernel.org>
Fri, 25 Aug 2023 00:00:55 +0000 (17:00 -0700)
committerCarlos Maiolino <cem@kernel.org>
Fri, 25 Aug 2023 12:57:44 +0000 (14:57 +0200)
commit8105f53edfe4625f42477f2f7ca3339450227b8a
treea8a2ad58d56f63d8928d987cad98856115650494
parenta86308c98d33e921eb133f47faedf1d9e62f2e77
xfsprogs: don't allow udisks to automount XFS filesystems with no prompt

The unending stream of syzbot bug reports and overwrought filing of CVEs
for corner case handling (i.e. things that distract from actual user
complaints) in XFS has generated all sorts of of overheated rhetoric
about how every bug is a Serious Security Issue(tm) because anyone can
craft a malicious filesystem on a USB stick, insert the stick into a
victim machine, and mount will trigger a bug in the kernel driver that
leads to some compromise or DoS or something.

I thought that nobody would be foolish enough to automount an XFS
filesystem.  What a fool I was!  It turns out that udisks can be told
that it's okay to automount things, and then GNOME will do exactly that.
Including mounting mangled XFS filesystems!

<delete angry rant about poor decisionmaking and armchair fs developers
blasting us on X while not actually doing any of the work>

Turn off /this/ idiocy by adding a udev rule to tell udisks not to
automount XFS filesystems.

This will not stop a logged in user from unwittingly inserting a
malicious storage device and pressing [mount] and getting breached.
This is not a substitute for a thorough audit.  This is not a substitute
for lklfuse.  This does not solve the general problem of in-kernel fs
drivers being a huge attack surface.  I just want a vacation from the
sh*tstorm of bad ideas and threat models that I never agreed to support.

v2: Add external logs to the list too, and document the var we set

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
configure.ac
include/builddefs.in
m4/package_services.m4
scrub/Makefile
scrub/xfs.rules [new file with mode: 0644]