Go to file
William Roberts acbb504eaf tpm2: add support for a trusted SRK
Prevent attackers from spoofing the tpmKey portion of the AuthSession by
adding a trusted key to the LUKS header metadata. Also, use a persistent
object rather than a transient object.

This provides the following benifits:
1. No way to MITM the tpmKey portion of the session, see [1] for
details.

2. Strengthens the encrypted sessions, note that the bindKey could be
   dropped now.

3. Speed, once it's created we just use it.

4. Owner Auth is needed to call create primary, so using the SRK
   creates a scratch space for normal users.

This is a "first to set" model, in where the first person to set the key
in the LUKS header wins. Thus, setup should be done in a known good
state. If an SRK, which is a primary key at a special persistent
address, is found, it will use whatever is there. If not, it creates an
SRK. The SRK follows the convetions used through the tpm2-software
organization code on GitHub [2], however, a split has occured between
Windows and Linux with respect to SRK templates. The Linux SRK is
generated with the unique field size set to 0, in Windows, it properly
sets the size to key size in bytes and the unique data to all 0's of that
size. Note the proper templates for SRKs is covered in spec [3].
However, the most important thing, is that both SRKs are passwordless,
and thus they should be interchangable. If Windows is the first to make
the SRK, systemd will gladly accept it and vice-versa.

1. Without the bindKey being utilized, an attacker was able to intercept
this and fake a key, thus being able to decrypt and encrypt traffic as
needed. Introduction of the bindKey strengthened this, but allows for
the attacker to brute force AES128CFB using pin guesses. Introduction of
the salt increases the difficulty of this attack as well as DA attacks
on the TPM objects itself.

2. https://github.com/tpm2-software

3. https://trustedcomputinggroup.org/wp-content/uploads/TCG-TPM-v2.0-Provisioning-Guidance-Published-v1r1.pdf

Fixes: #20668
Fixes: #22637

Signed-off-by: William Roberts <william.c.roberts@intel.com>
2023-04-03 13:10:49 +02:00
.clusterfuzzlite ci: unpin CFLite 2022-04-26 09:13:57 +00:00
.github build(deps): bump github/codeql-action from 2.2.5 to 2.2.9 2023-04-01 19:11:42 +02:00
.semaphore test: drop whitespace after shell redirection operators 2023-02-06 09:19:04 +01:00
catalog man,catalog: fix typo 2023-02-24 08:52:42 +09:00
coccinelle coccinelle: add a transformation for GNU conditionals 2023-03-18 14:23:11 +01:00
docs docs: fix coredump legacy example 2023-03-31 11:47:17 +02:00
factory vconsole: allow setting default keymap through build option 2023-02-15 20:00:51 +00:00
hwdb.d update 60-sensor.hwdb with toshiba tablet (#27103) 2023-04-03 00:09:11 +01:00
LICENSES network: change license of examples to MIT-0 2022-10-26 08:39:34 +02:00
man Merge pull request #27044 from bluca/sysext_recursive_dir 2023-04-03 12:38:48 +02:00
mkosi.conf.d mkosi: Drop python-docutils 2023-03-29 14:33:06 +02:00
mkosi.extra mkosi: Update to latest 2023-03-29 13:27:19 +02:00
modprobe.d meson: install the right README file in modprobe.d 2021-07-07 14:52:05 +02:00
network meson: Install missing network file 2023-01-27 17:50:27 +01:00
po po: Translated using Weblate (Russian) 2023-04-02 16:25:12 +09:00
presets journal: give the ability to enable/disable systemd-journald-audit.socket 2023-01-11 17:18:57 +01:00
rules.d rules: add whitespace after comma before the line continuation 2023-03-27 10:00:30 +00:00
shell-completion treewide: fix unnecessary $ on arithmetic variables 2023-04-01 01:48:44 +08:00
src tpm2: add support for a trusted SRK 2023-04-03 13:10:49 +02:00
sysctl.d tree-wide: link to docs.kernel.org for kernel documentation 2022-07-04 19:56:53 +02:00
sysusers.d sysusers: also add root group 2023-02-15 10:29:10 +09:00
test Merge pull request #27044 from bluca/sysext_recursive_dir 2023-04-03 12:38:48 +02:00
tmpfiles.d tmpfiles.d: drop misleading comment 2023-02-21 13:46:39 +01:00
tools tools: add dump-auxv.py 2023-03-24 18:49:34 +00:00
units sysext: stop storing under /usr/lib[/local]/extensions/ 2023-03-30 11:25:17 +01:00
xorg xorg/50-systemd-user: add a full license header 2021-10-01 14:45:00 +02:00
.clang-format clang-format: Adjust style of pointers 2022-05-30 04:00:54 +09:00
.ctags editors: Prevent ctags from following symlinks 2019-02-15 11:01:20 -08:00
.dir-locals.el scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
.editorconfig mkosi: Use 4 space indentation for scripts 2023-02-21 14:22:52 +01:00
.gitattributes gitattributes: introduce and use "generated" attribute 2021-10-18 09:42:55 +02:00
.gitignore mkosi: Update to latest 2023-03-29 13:27:19 +02:00
.mailmap mailmap: two more names 2021-03-30 13:17:58 +02:00
.packit.yml packit: drop/replace deprecated directives 2022-12-15 21:48:49 +09:00
.vimrc scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
.ycm_extra_conf.py ycm: add doc string for all the functions in configuration file 2017-11-29 13:21:49 -07:00
configure tools: shellcheck-ify tool scripts 2021-09-30 12:27:06 +02:00
LICENSE.GPL2 relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
LICENSE.LGPL2.1 licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
Makefile tree-wide: add spdx header on all scripts and helpers 2021-01-28 09:55:35 +01:00
meson.build Merge pull request #26870 from fbuihuu/move-unit-tests-in-a-dedicated-subdir 2023-03-27 09:38:15 +01:00
meson_options.txt tree-wide: Drop gnu-efi 2023-03-10 11:41:03 +01:00
mkosi.build mkosi: Use default timeout of 10s 2023-03-16 18:19:37 +01:00
mkosi.kernel.config mkosi: Enable CONFIG_ZBOOT 2022-12-13 21:27:15 +01:00
mkosi.postinst mkosi: Reduce postinst script indentation 2023-02-21 15:23:15 +01:00
mkosi.prepare mkosi: Use globs instead of prepare script to install extra packages 2023-02-10 16:05:32 +01:00
NEWS doc: replace wrong á preposition by à 2023-03-07 13:06:43 +01:00
README docs: update unit name for sd-tmpfiles-setup 2023-03-19 01:32:50 +08:00
README.md README: update CentOS CI URLs to the new instance 2023-03-03 18:38:40 +01:00
TODO tpm2: add support for a trusted SRK 2023-04-03 13:10:49 +02:00

Systemd

System and Service Manager

Semaphore CI 2.0 Build Status
Coverity Scan Status
OSS-Fuzz Status
CIFuzz
CII Best Practices
CentOS CI - CentOS 8
CentOS CI - Arch
CentOS CI - Arch (sanitizers)
CentOS CI - Rawhide (SELinux)
Fossies codespell report
Coverage Status
Packaging status
OpenSSF Scorecard

Details

Most documentation is available on systemd's web site.

Assorted, older, general information about systemd can be found in the systemd Wiki.

Information about build requirements is provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the Code Map for information about this repository's layout and content.

Please see the Hacking guide for information on how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.

Stable branches with backported patches are available in the stable repo.