Skip to content

Include plaintext password in command's environment#3

Open
Gumnos wants to merge 1 commit intojcs:masterfrom
Gumnos:convey_password
Open

Include plaintext password in command's environment#3
Gumnos wants to merge 1 commit intojcs:masterfrom
Gumnos:convey_password

Conversation

@Gumnos
Copy link
Copy Markdown

@Gumnos Gumnos commented Nov 21, 2025

login_duress can also be used to perform an action when NOT under duress, allowing the system credentials to boot into an innocuous sytem, then have the "duress" password configure things normally.

Notably, doing things like running bioctl -c C to attach a crypto volume at login via the command run by login_duress. However, to do that, bioctl needs a password (using a keyfile/keydisk would be an additional vulnerability, and can't be rotated like passwords can)

This change should put the plaintext password in the environment so the script that login_duress runs can use it something like

echo "$PASSWORD" | bioctl -c C -s -l $HOME/.vault.img
mount /dev/sd1 $HOME/private/

As I understand the existing code, this command-script that login_duress runs will run to completion and exit rather than leaking the environment variables to the resulting post-login shell.

login_duress can also be used to perform an action when NOT under
duress, allowing the system credentials to boot into an innocuous
sytem, then have the "duress" password configure things normally.

Notably, doing things like running `bioctl -c C` to attach a crypto
volume at login via the command run by login_duress.  However, to
do that, `bioctl` needs a password (using a keyfile/keydisk would
be an additional vulnerability, and can't be rotated like passwords
can)

This change should put the plaintext password in the environment
so the script that login_duress runs can use it something like

  echo "$PASSWORD" | bioctl -c C -s -l $HOME/.vault.img
  mount /dev/sd1 $HOME/private/

As I understand the existing code, this command-script that
login_duress runs will run to completion and exit rather than leaking
the environment variables to the resulting post-login shell.
@Gumnos
Copy link
Copy Markdown
Author

Gumnos commented Nov 21, 2025

FWIW, this stemmed from brynet@ mentioning login_duress leading me to play around with the version in packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant