]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
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)
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

1  2 
test/units/TEST-70-TPM2.cryptsetup.sh

Simple merge