~ubuntu-branches/ubuntu/trusty/libpam-mount/trusty-proposed

« back to all changes in this revision

Viewing changes to doc/bugs.txt

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Kleineidam
  • Date: 2010-05-19 04:05:25 UTC
  • mfrom: (1.4.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100519040525-yym18fn8k070smfe
Tags: 2.3-1
* New upstream release.
  + mount.crypt passes keyfile info to open LUKS volumes
    (Closes: #528366)
  + umount.crypt works again (Closes: #581713)

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 
10
10
        openssl ... | cryptsetup create ...
11
11
 
12
 
cryptsetup will strip all data starting from the first newline when
13
 
run without the --key-file=- option. pam_mount makes sure cryptsetup
14
 
will use the entire key material, by using the --key-file option.
 
12
Without any extra arguments, input is processed as if it were
 
13
interactive, that is, everything starting from the first newline is
 
14
ignored. This is standard behavior for stdin. Other truncations to
 
15
binary characters may happen.
 
16
 
 
17
pam_mount's mount.crypt makes sure that libcryptsetup uses the entire
 
18
key material, including newlines, NUL bytes or other characters.
15
19
However, since you created your crypto volume with a truncated key
16
20
that is different from the real one, mounting may fail unexpectedly.
17
21
 
34
38
to using the key file's length (when decrypted) as the cipher size.
35
39
 
36
40
 
 
41
[ shell - key expansion ]
 
42
 
 
43
Some HOWTOs suggest manual key generation for encrypted volumes, however
 
44
they fail to guard against shell semantics, such as:
 
45
 
 
46
        KEY=$(head -c79 /dev/urandom)
 
47
 
 
48
At least bash strips all \x00 bytes from the input. There might be worse
 
49
behavior. Furthermore,
 
50
 
 
51
        echo $KEY | openssl ...
 
52
 
 
53
implicitly adds a newline into the stream, which is unwanted for
 
54
key generation. Please use the pmt-ehd tool to create PLAIN-type
 
55
encrypted volumes.
 
56
 
 
57
 
37
58
[ gksu & kdesu ]
38
59
 
39
60
gksu interprets any output on stderr as an error. pam_mount writes