luksFormat data leak
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cryptsetup (Ubuntu) |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Release: Ubuntu 17.10
Package version: 2:1.7.3-4ubuntu1
Package architecture: amd64
When initializing a disk with "cryptsetup luksFormat <device>", cryptsetup creates a luks header including uninitialized areas.
Try this:
--
DISK=sdx
# Store 2MiB of a repeating pattern on disk
python -c 'print(
cryptsetup luksFormat /dev/$DISK
cryptsetup luksHeaderBackup --header-
hd luks_header.bin
--
You'll observe the following output:
[...]
00020400 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff |.."3DUfw........|
*
00100400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00101000
So even if you open the luks device and wipe /dev/mapper/
To make it even worse, it gets stored in backups of the luks header, so you can't overwrite it safely and restore the header later.
I'd expect cryptsetup luksFormat to fill unused fields of the luks header with constant or random data.
It would be nice if there was an easy way to safely wipe unused areas of the luks header on an already formatted disk.
Regards,
Andreas
information type: | Private Security → Public Security |
Changed in cryptsetup (Ubuntu): | |
importance: | Undecided → Wishlist |
LUKS FAQ includes "Note that automatic wiping is on the TODO list for cryptsetup, so at some time in the future this will become unnecessary."
https:/ /gitlab. com/cryptsetup/ cryptsetup/ wikis/Frequentl yAskedQuestions /gitlab. com/cryptsetup/ cryptsetup/ issues/ 267
https:/
Thanks