-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"bcachefs unlock -f /dev/null" quits with SIGSEGV, Segmentation fault #314
Comments
The same happens if password file is empty (I have fs with empty password). |
For a full reproduction against current head --bytes=1G < /dev/zero > loop
yes | bcachefs mkfs --encrypted loop
bcachefs unlock -f /dev/null loop |
The error originates in https://github.com/koverstreet/bcachefs-tools/blob/master/c_src/tools-util.c#L127 if (!strlen(buf)) {
free(buf);
buf = NULL;
} After reading the passphrase from file, we return Commit 7c39a1c by Kent introduced the check for an empty passphrase, but I don't know why. We have two ways forward: Either: forbid empty passphrases, and fail with a proper error message. That would also entail teaching Or: handle empty passphrases in |
Fixes issues koverstreet#314
bcachefs unlock /dev/xxxx -f /dev/null
throws core:gdb:
The text was updated successfully, but these errors were encountered: