Whamcloud - gitweb
e2fsprogs: don't allow udisks to automount ext4 filesystems with no prompt
authorDarrick J. Wong <djwong@kernel.org>
Thu, 24 Aug 2023 22:26:31 +0000 (15:26 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 15 Dec 2023 20:24:25 +0000 (12:24 -0800)
commita7950660ca798744482e43d409c83215fbb3b98a
treec1d09aac5feefcce7d813bd35cda1b5afd607c08
parentc45ca2925b031df1a85b8b35c8429fd4bf67c14d
e2fsprogs: don't allow udisks to automount ext4 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 ext4 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 ext4
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 ext4 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 ext4 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 of all codebases.  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.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
scrub/Makefile.in
scrub/ext4.rules.in [new file with mode: 0644]