Skip to content

fscrypt enters an infinite loop if an invalid key file is specified. #457

Closed

Description

@bitardiichanru-shrg

fscrypt enters an infinite loop if the key file is specified incorrectly or the password is set incorrectly.

I write bash script, which will backup the userdata onto dir on backup drive, encrypted with fscrypt.
Script has a string like:
fscrypt unlock --unlock-with=/mnt/exthdd01:77f332536f86d4a2 --key=/home/romano/backup_drive.key /mnt/exthdd01/backup
intentionally specified an incorrect key for the test.
The same situation applies to entering a password if the protector is custom or login: scrypt enters an infinite loop of password prompts until it is interrupted by pressing Ctrl-C.

Activity

  1. ebiggers commented on Aug 19, 2026

    @ebiggers
    Collaborator

    Did you try the latest master branch?

  2. bitardiichanru-shrg commented on Aug 19, 2026

    @bitardiichanru-shrg
    Author

    What's a master branch? I don't understand anything about it. I installed fscrypt using apt-get install.
    I just want this bug fixed someday. It's a good program, perfect for encrypting your home directory and such, but it's not yet suitable for use in scripts.

  3. ebiggers commented on Aug 19, 2026

    @ebiggers
    Collaborator

    Well, it is the development version of fscrypt, which you're reporting a bug against by filing an issue here. So you should have tested it, in case the bug was fixed recently.

    Anyway, no matter, since I tested it and this bug does still exist.

  4. ebiggers commented on Aug 19, 2026

    @ebiggers
    Collaborator

    #458 fixes this.

    You can also avoid the bug by adding the --quiet option. There was already no loop in that case.

  5. bitardiichanru-shrg commented on Aug 20, 2026

    @bitardiichanru-shrg
    Author

    You can also avoid the bug by adding the --quiet option. There was already no loop in that case
    It looks like it worked! Thanks!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions