Commit Graph

6 Commits

Author SHA1 Message Date
Yu Watanabe
e71ff6639c man: fix typo
Follow-up for 778cfac5fb.
Addresses https://github.com/systemd/systemd/pull/37434#discussion_r2088882005.
2025-05-15 02:56:30 +09:00
Lennart Poettering
778cfac5fb man: document that gpt-label/gpt-type uuid xattrs are now lists 2025-05-14 15:44:54 +02:00
Mike Yuan
28bae3dbe3 man/systemd-validatefs@.service: fix typo 2025-03-31 19:23:50 +02:00
Lennart Poettering
85afe4760b repart: automatically generate validatefs xattrs
Let's automatically generate validatefs xattrs by default, that encode
the intended use of partitions.

This defaults to on, since the structure of repart definition files
tells us enough on use for this to be safe. There's an option however,
to turn this off.
2025-03-31 15:14:45 +02:00
Lennart Poettering
f872373a26 generators: hook in validatefs on gpt-auto and fstab generator mounts
Let's turn on validatefs automatically for all auto-discovered
partitions.

Let's add an x-systemd.validatefs option to optionally turn this on for
fstab listed file systems.
2025-03-31 15:14:28 +02:00
Lennart Poettering
0bdd5ccc81 validatefs: add new tool that enforces mount constraints
This new tool looks for a three xattr on the root inode of a file system
that encode mount constraints of the file system. The tool is supposed
to be hooke into the mount logic and is supposed to protect against
misappropriating trusted file systems in unintended ways.

Consider the following scenario: we boot up on first boot and create a
tpm-locked pair of /var/ and /srv/ partitions via systemd-repart. An
attacker then offline modifies the partition table, exchanging the
metadata of the /var/ and /srv/ partition. So far we'd happily accept
that, honour the modified metadata and boot up. This could be used to
revert changes to /var/ or similar. And all that even though both
partitions are encrypted and locked to TPM!

With this new mechanism we can encode in the protected contents of the
file systems the ways it can be used: the partition type uuid, the
partition label and the intended mount point can be stored in xattrs,
and we can check them automatically on mount, and take action on
mismatch. (action would typically be immediate reboot).
2025-03-31 15:14:13 +02:00