[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [opensuse-security] Weird encrypted filesystem problem.



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


The Wednesday 2007-02-14 at 11:40 +0100, Ludwig Nussel wrote:

> Yeah, that's an unfortunate situation indeed.
> 
> I had a look at dm-crypt yesterday. Looks like a trivial patch is
> sufficient for it to be able to to access legacy images without the
> nasty side effects of loop_fish2.
> 
> In case you don't mind breaking your whole system with barely tested
> software ;-) I've put the patch for dm-crypt.c and shell scripts
> that pass the correct parameters to cryptsetup here:
> http://www.suse.de/~lnussel/cryptsetup-legacy.tar.gz
> 
> You need to install util-linux-crypto and if you want to recompile
> the kernel module also kernel-source.
> 
> For example to mount a dvd:
> cryptsetup-twofishSL92 foo /dev/hdc
> mount /dev/mapper/foo /a
> 
> Or an image:
> losetup /dev/loop0 img
> cryptsetup-twofish256 bar /dev/loop0
> mount /dev/mapper/bar /b
> 


I'm finally trying this up, but I can't make it go. I compiled 
cryptsetup-legacy.tar.gz using the script "compile.sh". I have 
kernel-source installed (I'm running my own compiled kernel).

nimrodel:~/bin/cryptsetup-legacy # ./compile.sh
patching file dm-crypt.c
make: Entering directory `/usr/src/linux-2.6.18.8-0.1-obj/i386/default'
make -C ../../../linux-2.6.18.8-0.1 O=../linux-2.6.18.8-0.1-obj/i386/default modules
  CC [M]  /root/bin/cryptsetup-legacy/dm-crypt.o
  Building modules, stage 2.
  MODPOST
  CC      /root/bin/cryptsetup-legacy/dm-crypt.mod.o
  LD [M]  /root/bin/cryptsetup-legacy/dm-crypt.ko
make: Leaving directory `/usr/src/linux-2.6.18.8-0.1-obj/i386/default'
ok, now run insmod ./dm-crypt.ko


But:


nimrodel:~/bin/cryptsetup-legacy # insmod ./dm-crypt.ko
insmod: error inserting './dm-crypt.ko': -1 Invalid module format


The kernel log shows:

Apr 16 00:19:05 nimrodel kernel: dm_crypt: disagrees about version of symbol struct_module


My guess is that it doesn't work because I'm not using kernel-default, but 
my compiled version. How should I modify the compile script?

Perhaps I should add my own directory to "/usr/src/linux-obj/i386/" (I 
don't know how), or copy the modified dm-crypt.c to 
/usr/src/linux/drivers/md/ and recompile the whole module tree? The last 
one probably needs rebooting.

- -- 
Cheers,
       Carlos E. R.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Made with pgp4pine 1.76

iD8DBQFGIrhltTMYHG2NR9URAnTHAJ9mC9jVAMwrbSh2r71okl1wlOUDOgCeIv8E
5any9kGbc0CXE1bERmUtrDo=
=FoSC
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-security+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-security+help@xxxxxxxxxxxx