]> git.ipfire.org Git - thirdparty/systemd.git/commit
cryptsetup: avoid a segfault when a keyfile is passed along with a TPM device (#41892)
authorZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Tue, 5 May 2026 09:10:25 +0000 (11:10 +0200)
committerGitHub <noreply@github.com>
Tue, 5 May 2026 09:10:25 +0000 (11:10 +0200)
commitf8d01ff7a8885ac5f9c57d0ec4f92d1c25440f9b
tree93d02aaf737773221513ed29c03d921fe7b90804
parentae973bb61767fce6b428f52b20cfcddf2c70c944
parent4820d57eeec98385c25a47e427826f466590360a
cryptsetup: avoid a segfault when a keyfile is passed along with a TPM device (#41892)

A segfault is observed when both key_file and tpm2-device are
simultaneously passed to systemd-cryptsetup, e.g.:
  systemd-cryptsetup attach test_data /vol /my-pass tpm2-device=auto

The crash appears after commit 5c6aad9 but the flaw in the logic was
pre-existing.

Fixes #41867
test/units/TEST-70-TPM2.cryptsetup.sh