1

Are there any preferred filesystems that have some boni regarding security and confidentiality? Or does it really not matter if I, for example, encrypt a HDD with LUKS?

As an example, I read that the ZFS file system has some good implementations against data corruption which I would consider a bonus for security.

  • what do you mean by "some boni" – MikeSchem Mar 14 '17 at 3:18
1

Security is the tryptic confidentiality, integrity and availability. And not surprisingly, there are different paths for all 3 pilars:

  • confidentiality is achieved through encryption
  • integrity rely on redundancy: you store some redundant information that can help to detect (and eventually fix) data corruption.
  • availability also rely on redundancy, normaly at a physical level to allow a file system to still be available even if one of its physical componenents is off.

ZFS and LUKS are orthogonal on a security point of view: LUKS specificaly addresses confidentiality while ZFS is focused on integrity (and availability if the underlying components live on different hardware devices)

So if you are interested in integrity and not only confidentiality, ZFS or RAID should be considered, independently of the confidentiality point of view addressed by LUKS.

  • ZFS can also help with the availability aspect by integrating RAID and volume management into the file system. Or you can get the same effect, but not necessarily all of the nicities, by layering a file system on top of LVM or MD. Adding LUKS gives you confidentiality against some threats; not all! For example, LUKS does nothing for confidentiality against an adversary who is able to inspect a running system, but it does provide confidentiality for data-at-rest situations where the system is powered off or the LUKS container otherwise closed. Bottom line as usual: Know your threat model. – a CVn Mar 14 '17 at 10:54
1

LUKS is just the encryption to the disk itself. LUKS can exist on any partition and the filesystem is whatever it has been formatted to. If you're running ZFS and you create a /dev/loop point for it and encrypt it with LUKS, you'll be running whatever file system you use to format the /dev/mapper/device, in an encrypted container, on top of zfs. Ex: EXT3|LUKS|loop|zfs

Learn about using lvm. You'll thank me.

1

Generally it doesn't matter which filesystem you use if you intend to put an encryption layer such as LUKS in between the hard drive and the filesystem, because LUKS will give every filesystem the same amount of protection.

However there are some things to be aware off, which will start to matter if you don't use disk encryption or if your LUKS partition is breached (maybe due to you having used a weak password).

There are some filesystems which use copy-on-write tactics to keep your data safe - meaning that if you change a file, the old data won't be overwritten. btrfs is an example of such a filesystem, and others don't do this for data, but do it for metadata. Pretty much every journaling filesystem has some amount of copy-on-write built-in.

The problem with copy-on-write from a confidentiality standpoint is that you can't reliably overwrite sensitive data. If I use the "shred" program on unix to overwrite a file ten thousand times with random data, it will just create ten thousand instances of random data on my drive and hide every instance except the last from view, but the original data will still sit around unmodified.

The same, to a lesser degree, is true with any filesystem on flash memory and SSD due to built-in wear-leveling technologies.

As you say, this can also be a plus if you're mainly interested in data integrity.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.