[Bug 738546] New: cryptsetup cannot handle empty key-files
https://bugzilla.novell.com/show_bug.cgi?id=738546 https://bugzilla.novell.com/show_bug.cgi?id=738546#c0 Summary: cryptsetup cannot handle empty key-files Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: All OS/Version: SuSE Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: Yarny@public-files.de QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20100101 Firefox/9.0 cryptsetup can use key files instead of passphrases when encrypting and unlocking volumes. When using an empty key file, cryptsetup fails with "Out of memory while reading passphrase." Reproducible: Always Steps to Reproduce: $ touch /tmp/empty_file $ cryptsetup -q luksFormat /dev/some_device /tmp/empty_file Actual Results: Out of memory while reading passphrase. Expected Results: Silent success. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=738546
https://bugzilla.novell.com/show_bug.cgi?id=738546#c1
--- Comment #1 from Yarny Yarny
https://bugzilla.novell.com/show_bug.cgi?id=738546
https://bugzilla.novell.com/show_bug.cgi?id=738546#c
zj jia
https://bugzilla.novell.com/show_bug.cgi?id=738546
https://bugzilla.novell.com/show_bug.cgi?id=738546#c2
Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=738546
https://bugzilla.novell.com/show_bug.cgi?id=738546#c3
Yarny Yarny
this is a pretty old bug. Really? Empty keyfiles work well with openSUSE 11.4 (cryptsetup 1.2.0-6.9.1), so I considered this a regression.
Do you have a use case for it Yes, this bug broke my openSUSE setup script when I tried to move to 12.1. That script creates some luks partitions and initializes them with an empty password. To this end creates an empty keyfile. Of course the workaround is simple: I now use a single space (" ") as initial password, but just hitting enter while booting was quite comfortable with 11.4. Also I have other scripts that call cryptsetup with on-the-fly-created keyfiles, and I also will have to modify these to catch empty passwords.
Yarny P.S.: There's a typo in my patch: Missing brackets. The line should read + else if ((size_t)st.size) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=738546
https://bugzilla.novell.com/show_bug.cgi?id=738546#c4
--- Comment #4 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=738546
https://bugzilla.novell.com/show_bug.cgi?id=738546#c5
Ludwig Nussel
participants (1)
-
bugzilla_noreply@novell.com