]> git.sesse.net Git - bcachefs-tools-debian/commit
misc: don't allow udisks to automount bcachefs filesystems with no prompt
authorDarrick J. Wong <djwong@kernel.org>
Tue, 5 Dec 2023 00:44:29 +0000 (19:44 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Tue, 5 Dec 2023 00:49:26 +0000 (19:49 -0500)
commitf407121d18d2fdf3fd6a91f9a1569e453c2beaa9
treeb2d76dfb67ffebe5fd3965a04c41d9fbee3d50d6
parentf27b135285d032d9570a1accb00412e111b38878
misc: don't allow udisks to automount bcachefs 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!  Same with bcachefs!

<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 bcachefs 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 to give Kent a break
from some of the oceans of bu******.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Makefile
udev/bcachefs.rules [new file with mode: 0644]