kernel-packages team mailing list archive
-
kernel-packages team
-
Mailing list archive
-
Message #86526
[Bug 1386339] [NEW] cryptswap can fail if random data matches a filesystem magic number
Public bug reported:
I noticed that my encrypted swap was not working, and I found that the
randomly generated encrypted filesystem had randomly generated data that
had the magic number of a filesystem type, and hence ever more it
refused to start...
Eg:-
root@hardline:/etc# more /etc/crypttab
cryptswap1 /dev/sda3 /dev/urandom swap,cipher=aes-cbc-essiv:sha256
root@hardline:/etc# cryptdisks_start cryptswap1
* Starting crypto disk... * cryptswap1 (starting)..
* cryptswap1: the precheck for '/dev/sda3' failed: - The device /dev/sda3 contains a filesystem type hfsplus.
* cryptswap1 (failed)... [fail]
Obviosuly this is not a filesystem:-
root@hardline:/etc# mount -t hfsplus /dev/sda3 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sda3,
missing codepage or helper program, or other error
So I blanked it and restarted, all is now well... perhaps if there's a
force option on cryptsetup this should be used in the setup scripts:-
root@hardline:/etc# dd if=/dev/zero of=/dev/sda3
^C684121+0 records in
684121+0 records out
350269952 bytes (350 MB) copied, 5.96378 s, 58.7 MB/s
root@hardline:/etc# cryptdisks_start cryptswap1
* Starting crypto disk... * cryptswap1 (starting)..
* cryptswap1 (started)... [ OK ]
** Affects: linux (Ubuntu)
Importance: Undecided
Status: Incomplete
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1386339
Title:
cryptswap can fail if random data matches a filesystem magic number
Status in “linux” package in Ubuntu:
Incomplete
Bug description:
I noticed that my encrypted swap was not working, and I found that the
randomly generated encrypted filesystem had randomly generated data
that had the magic number of a filesystem type, and hence ever more it
refused to start...
Eg:-
root@hardline:/etc# more /etc/crypttab
cryptswap1 /dev/sda3 /dev/urandom swap,cipher=aes-cbc-essiv:sha256
root@hardline:/etc# cryptdisks_start cryptswap1
* Starting crypto disk... * cryptswap1 (starting)..
* cryptswap1: the precheck for '/dev/sda3' failed: - The device /dev/sda3 contains a filesystem type hfsplus.
* cryptswap1 (failed)... [fail]
Obviosuly this is not a filesystem:-
root@hardline:/etc# mount -t hfsplus /dev/sda3 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sda3,
missing codepage or helper program, or other error
So I blanked it and restarted, all is now well... perhaps if there's a
force option on cryptsetup this should be used in the setup scripts:-
root@hardline:/etc# dd if=/dev/zero of=/dev/sda3
^C684121+0 records in
684121+0 records out
350269952 bytes (350 MB) copied, 5.96378 s, 58.7 MB/s
root@hardline:/etc# cryptdisks_start cryptswap1
* Starting crypto disk... * cryptswap1 (starting)..
* cryptswap1 (started)... [ OK ]
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1386339/+subscriptions
Follow ups
-
[Bug 1386339] Re: cryptswap can fail if random data matches a filesystem magic number
From: James Lewis, 2014-10-28
-
[Bug 1386339] Re: cryptswap can fail if random data matches a filesystem magic number
From: James Lewis, 2014-10-28
-
[Bug 1386339] WifiSyslog.txt
From: James Lewis, 2014-10-28
-
[Bug 1386339] UdevLog.txt
From: James Lewis, 2014-10-28
-
[Bug 1386339] UdevDb.txt
From: James Lewis, 2014-10-28
-
[Bug 1386339] RfKill.txt
From: James Lewis, 2014-10-28
-
[Bug 1386339] ProcModules.txt
From: James Lewis, 2014-10-28
-
[Bug 1386339] ProcInterrupts.txt
From: James Lewis, 2014-10-28
-
[Bug 1386339] ProcCpuinfo.txt
From: James Lewis, 2014-10-28
-
[Bug 1386339] Lsusb.txt
From: James Lewis, 2014-10-28
-
[Bug 1386339] Lspci.txt
From: James Lewis, 2014-10-28
-
[Bug 1386339] IwConfig.txt
From: James Lewis, 2014-10-28
-
[Bug 1386339] CurrentDmesg.txt
From: James Lewis, 2014-10-28
-
[Bug 1386339] CRDA.txt
From: James Lewis, 2014-10-28
-
[Bug 1386339] BootDmesg.txt
From: James Lewis, 2014-10-28
-
[Bug 1386339] Re: cryptswap can fail if random data matches a filesystem magic number
From: James Lewis, 2014-10-28
-
[Bug 1386339] Re: cryptswap can fail if random data matches a filesystem magic number
From: Joseph Salisbury, 2014-10-27
-
[Bug 1386339] Missing required logs.
From: Brad Figg, 2014-10-27
-
[Bug 1386339] [NEW] cryptswap can fail if random data matches a filesystem magic number
From: James Lewis, 2014-10-27
References