3 Commits

Author SHA1 Message Date
Will Fancher
5dd424b9f6 udev rules: Add per-member links in /dev/disk/by-uuid
The standard udev rules create a `/dev/disk/by-uuid/` link using the
FS's global UUID. This is good. It means the FS UUID can be used to
wait for *any* device that's a member of the FS. But, for a
multi-device file system, users are advised to add the options
`x-systemd.wants=/dev/disk/by-id/xyz` using some ID that's unique to
each specific disk. This way systemd knows to wait for each member. If
any of them times out, the use of `wants` rather than `requires`
allows for a degraded mount to be attempted, if the user has
configured the `degraded` option.

This adds a per-member UUID link in `/dev/disk/by-uuid/` to use for
this purpose.
2025-10-12 19:22:19 -04:00
Alexander Fougner
1c2cb80376 fix udev rules path
- include rules file in rpmspec
- update install docs with udev build requirement

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-06 15:41:05 -05:00
Darrick J. Wong
f407121d18 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>
2023-12-04 19:49:26 -05:00