Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 107322 - util-linux-2.12q and USE=old-crypt causes mount failure on aes-256 loopback files
Summary: util-linux-2.12q and USE=old-crypt causes mount failure on aes-256 loopback f...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High major
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-26 13:49 UTC by Peter Hyman
Modified: 2005-09-27 13:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Hyman 2005-09-26 13:49:28 UTC
This could be me, it could be the kernel, it could be loop-aes, but I have to
report this somewhere! Loopback devices created with util-linux 2.12i with the
vanilla kernel 2.6.11.11 loop and cryptoloop and aes_i586 modules loaded will
NOT mount using mount-old-crypt, kernel 2.6.12-gentoo-r10, and loop-aes 3.0d. I
manually loaded loop and aes_i585 prior to trying the following...

Reproducible: Always
Steps to Reproduce:
1. modprobe loop (for loop-aes), modprobe aes_i586
2. as root, mount -t ext2 myfile myfilemountpoint -o loop,encryption=aes-256,rw
3. view error:


Actual Results:  
ioctl: LOOP_SET_STATUS: Invalid argument


Expected Results:  
encrypted file mounted

Reverting back to kernel 2.6.11.11 and util-linux 2.12i allows files to be
mounted properly. I recognize the reason for advancing to loop-aes, and was able
to extract my files from the encrypted filesystems fine. I do NOT know if this
only affects what I call "virtual" filesystems -- that is a device setup with
losetup but really is a file. I also do not know if it only affects aes, or if I
did not load an additional module. the crypto-loop file in /etc/conf.d/cryptfs
and crypto-loop files are bare and have not been uncommented. I'm marking this
as major only since it impedes filesystems from being mounted.
Comment 1 SpanKY gentoo-dev 2005-09-26 17:09:09 UTC
you probably have to run losetup-old-crypt yourself before running mount-old-crypt

those two files are built in the same way as the 2.12i ebuild, they're just renamed
Comment 2 Peter Hyman 2005-09-26 17:13:10 UTC
I was referring to an EXISTING file already created and set up. Maybe I missed
something here, but anyway, I was able to extract the info by downgrading
temporarily while I figure out how to do it with the new. thx
Comment 3 SpanKY gentoo-dev 2005-09-26 17:48:12 UTC
so was i

in order to use your existing file you're prob going to have to run
`losetup-old-crypt` and then `mount-old-crypt` by hand rather than just letting
`mount-old-crypt` run losetup for you
Comment 4 Peter Hyman 2005-09-26 18:03:16 UTC
stuff is my encryptied pseudo disk. I tried all these combinations. None of them
worked. Where can I get more detailed information about how to make this work?
Now, it's just a matter of pride :) I'm gonna get this to work! AES256 is from
the manpage. aes-256 is what I used to enter on the mount line.

peter@mars ~ $ sudo losetup-old-crypt -e aes256  /dev/loop0 stuff
You must specify a key size (in bits) for use with CryptoAPI encryption.
peter@mars ~ $ sudo losetup-old-crypt -e AES256  /dev/loop0 stuff
You must specify a key size (in bits) for use with CryptoAPI encryption.
peter@mars ~ $ sudo losetup-old-crypt -e AES256-256  /dev/loop0 stuff
Password: 
Invalid cipher "AES256"
Error in crypto parameters, exiting
peter@mars ~ $ sudo losetup-old-crypt -e AES256  /dev/loop0 ./stuff
You must specify a key size (in bits) for use with CryptoAPI encryption.
peter@mars ~ $ sudo losetup-old-crypt -e AES-256  /dev/loop0 ./stuff
Password: 
Invalid cipher "AES"
Error in crypto parameters, exiting

Anyway, thanks for the feedback. I really think though that there is something
amiss in the old-crypto code. Maybe at some point a warning about extrating the
data first should be posted. I've used cryptoloop for years and never had a
problem with a util-linux upgrade before.
Comment 5 Peter Hyman 2005-09-27 13:26:28 UTC
turns out that loop and cryptoloop had to be built into kernel image. None of
the processes would work if loaded with modprobe. So, for me, at least, I'm
stuck with old-crypt since, for the time being, these "modules" must be built
in. Took me forever to work that combination out! However, the crypto modules
can be loaded on demand. Go figure!