cryptsetup-reencrypt may use an incorrect hash if the hash parameter is omitted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cryptsetup (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Let's say:
- someone setup a fully encrypted bootable ubuntu system
- the /boot directory resists in the encrypted root filesystem so that it is also encrypted
- the parameters --cipher=
- everything was configured correctly so that GRUB is able to boot the encrypted system
- everything works fine, when you turn on the computer you will be prompted to unlock the encrypted system
Let's get to the problem:
- for some reason someone want to re-encrypt the entire system which is easily possible with cryptsetup-
- this is done with the following command: cryptsetup-
- the re-encryption process is successful
- but the system is now no longer bootable because cryptsetup-
The reason why the system is unbootable is:
- the "early grub core image" which was created by grub-install does not contain an sha256 module, and because of that grub is no longer able to read the encrypted volume in stage 1
Conclusion:
- if no cipher and/or hash was passed to cryptsetup-
Note:
- I can confirm that the system is still bootable if the parameters --cipher=
I know:
- grub-install could solve the issue but I think this is not the best solution and the behavior described here should be considered as a bug. A user expects everything to work without problems, and that everything is same like before (same cipher, same hash).
Summery:
cryptsetup-