Ensuring that mount(8) will always interpret a filesystem correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is there a guarantee that if all data before the filesystem superblock is
zero, and that the filesystem never writes to this region, libblkid (and
thus, presumably, mount(8)) will always mount the filesystem with the
correct filesystem type, even if e.g. someone writes a file containing
a superblock of a different filesystem and the filesystem happens to put
it where that superblock is valid?

The motivation for this message is that systemd-gpt-generator generates
mountpoints based on Discoverable Partition Specification GUIDs.  These
indicate the mountpoint of the partition but not the filesystem type.
If a correctly-produced filesystem image will always continue to be
recognized as the correct type, this is fine.  Otherwise, an unlucky
combination of writes to the filesystem and filesystem allocation decisions
could cause the filesystem to start being mounted as the wrong type, which
would be very bad.  According to https://github.com/util-linux/util-linux/issues/1305,
libblkid can indeed probe for subsequent superblocks after the first one it
finds.
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)





[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux