tpm2: add some extra validation of device string before using it
authorLennart Poettering <lennart@poettering.net>
Tue, 15 Nov 2022 22:01:04 +0000 (23:01 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 15 Nov 2022 22:14:54 +0000 (23:14 +0100)
commit50a085143fa8f5dd6b6b3cef8a6ea2ec7c53ed0d
tree31fdc42f92917e52ba36b12d3a9ecc6fdd1ce276
parent34906680afe60d724ea435b79b9b830a4bf2e7e9
tpm2: add some extra validation of device string before using it

Let's add some extra validation before constructing and using the .so
name to load. This isn't really security sensitive, given that we
used secure_getenv() to get the device string (and it thus should have
been come from a trusted source) but let's better be safe than sorry.
src/shared/tpm2-util.c