systemd version the issue has been seen with
253
Used distribution
Arch Linux
Linux kernel version used
6.4.2-arch1-1
CPU architectures issue was seen on
x86_64
Component
systemd
Expected behaviour you didn't see
I excepted systemd-creds to encrypt the provided plaintext secret, and output the encrypted string.
Unexpected behaviour you saw
systemd-creds hangs indefinitely if a file is provided on the command line, or after input is terminated with C-d if input is provided via the standard input.
Steps to reproduce the problem
To simplify reproduction, we'll create a file that contains content we want to encrypt.
$ TMPFILE=$(mktemp) && echo "foobar" > "$TMPFILE"
$ systemd-creds encrypt --with-key=tpm2 "$TMPFILE" -
<no output, command hangs>
Additional program output to the terminal or log subsystem illustrating the issue
➜ sudo SYSTEMD_LOG_LEVEL=debug systemd-creds encrypt --with-key=tpm2 /tmp/tmp.JIC2YaG7kI -
Place your right index finger on the fingerprint reader
varlink: Setting state idle-client
/run/systemd/userdb/io.systemd.DynamicUser: Sending message: {"method":"io.systemd.UserDatabase.GetGroupRecord","parameters":{"gid":1000,"service":"io.systemd.DynamicUser"}}
/run/systemd/userdb/io.systemd.DynamicUser: Changing state idle-client → awaiting-reply
/run/systemd/userdb/io.systemd.DynamicUser: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound","parameters":{}}
/run/systemd/userdb/io.systemd.DynamicUser: Changing state awaiting-reply → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/io.systemd.DynamicUser: Changing state processing-reply → idle-client
varlink: Setting state idle-client
/run/systemd/userdb/io.systemd.DynamicUser: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"sudoforge","service":"io.systemd.DynamicUser"},"more":true}
/run/systemd/userdb/io.systemd.DynamicUser: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/io.systemd.DynamicUser: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound","parameters":{}}
/run/systemd/userdb/io.systemd.DynamicUser: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/io.systemd.DynamicUser: Changing state processing-reply → idle-client
No credential name specified, not embedding credential name in encrypted data. (Disable this warning with --name=)
Including timestamp 'Sun 2023-07-09 12:15:01 PDT' in encrypted credential.
Using TPM2 TCTI driver 'device' with device '/dev/tpmrm0'.
Loaded TCTI module 'tcti-device' (TCTI module for communication with Linux kernel interface.) [Version 2]
TPM successfully started up.
Creating primary key on TPM.
systemd version the issue has been seen with
253
Used distribution
Arch Linux
Linux kernel version used
6.4.2-arch1-1
CPU architectures issue was seen on
x86_64
Component
systemd
Expected behaviour you didn't see
I excepted
systemd-credsto encrypt the provided plaintext secret, and output the encrypted string.Unexpected behaviour you saw
systemd-credshangs indefinitely if a file is provided on the command line, or after input is terminated withC-dif input is provided via the standard input.Steps to reproduce the problem
To simplify reproduction, we'll create a file that contains content we want to encrypt.
Additional program output to the terminal or log subsystem illustrating the issue
➜ sudo SYSTEMD_LOG_LEVEL=debug systemd-creds encrypt --with-key=tpm2 /tmp/tmp.JIC2YaG7kI - Place your right index finger on the fingerprint reader varlink: Setting state idle-client /run/systemd/userdb/io.systemd.DynamicUser: Sending message: {"method":"io.systemd.UserDatabase.GetGroupRecord","parameters":{"gid":1000,"service":"io.systemd.DynamicUser"}} /run/systemd/userdb/io.systemd.DynamicUser: Changing state idle-client → awaiting-reply /run/systemd/userdb/io.systemd.DynamicUser: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound","parameters":{}} /run/systemd/userdb/io.systemd.DynamicUser: Changing state awaiting-reply → processing-reply Got lookup error: io.systemd.UserDatabase.NoRecordFound /run/systemd/userdb/io.systemd.DynamicUser: Changing state processing-reply → idle-client varlink: Setting state idle-client /run/systemd/userdb/io.systemd.DynamicUser: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"sudoforge","service":"io.systemd.DynamicUser"},"more":true} /run/systemd/userdb/io.systemd.DynamicUser: Changing state idle-client → awaiting-reply-more /run/systemd/userdb/io.systemd.DynamicUser: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound","parameters":{}} /run/systemd/userdb/io.systemd.DynamicUser: Changing state awaiting-reply-more → processing-reply Got lookup error: io.systemd.UserDatabase.NoRecordFound /run/systemd/userdb/io.systemd.DynamicUser: Changing state processing-reply → idle-client No credential name specified, not embedding credential name in encrypted data. (Disable this warning with --name=) Including timestamp 'Sun 2023-07-09 12:15:01 PDT' in encrypted credential. Using TPM2 TCTI driver 'device' with device '/dev/tpmrm0'. Loaded TCTI module 'tcti-device' (TCTI module for communication with Linux kernel interface.) [Version 2] TPM successfully started up. Creating primary key on TPM.