On Fri, Jul 21, 2023 at 10:55:39AM +0200, Marco d'Itri wrote: > Unless somebody has a better idea then then my plan is to ship in the > next upload of kmod a file in /etc/modprobe.d/ which uses the blacklist > directive to prevent automatically loading some file system modules.
I think this would break any existing fstab entries that reference hfs and hfsplus, and the convenient way to integrate Linux boot with x86 Macs is certainly to have an hfsplus EFI partition so this may be a legitimate use-case. It also means that anyone who has a need to use one of these filesystems in a static manner is vulnerable to automount attacks using them. Completely untested, but I think something along the lines of: SUBSYSTEM!="block", GOTO="udisks_insecure_fs_end" ENV{ID_FS_TYPE}=="hfs", ENV{UDISKS_AUTO}="0" ENV{ID_FS_TYPE}=="hfsplus", ENV{UDISKS_AUTO}="0" LABEL="udisks_insecure_fs_end" in a udev fragment should work? Any static fstab or mount units should still work, but it should disable udisks automounting regardless of the desktop agent involved, even if the fs modules are already loaded.