mount.crypt segfaults when switching to battery

Bug #353935 reported by Per Ångström
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
libpam-mount (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: libpam-mount

Linux 2.6.28-11-generic #39-Ubuntu SMP Thu Apr 2 04:39:54 UTC 2009 x86_64 GNU/Linux

Having a tail on my /var/log/messages I see that whenever I pull the mains and the computer switches to battery, something like the following will be output:

Apr 2 18:23:17 barbaren kernel: [ 3661.921490] mount.crypt[6570]: segfault at fffffffffffffffc ip 00007fc12e315cfd sp 00007fff36737ab0 error 4 in libHX.so.14.2.0[7fc12e310000+b000]

Today this happened while I was resuming from hibernation, and I got a crash report which was posted to bug #353726 (duplicate of #346824, which I'm not allowed to see).

Revision history for this message
Psychotron (redm) wrote :

I'm also having crashes of mount.crypt. I guess it's the same cause, so I'm attaching it here, rather then creating a new entry.

I have set up an encrypted loop file to be pam-mounted as a users home (the user is called "test" in my case). In most cases when loggin in as that user mount.crypt crashes. Sometimes it works, though. But it's not usable this way.

The loop file has been encrypted with:

cryptsetup -y --cipher aes-xts-plain --key-size 512 luksFormat /dev/loop0
(with /dev/loop0 connected to /data/tmp/test.img).

I added:

<volume user="test" fstype="crypt" path="/data/tmp/test.img" mountpoint="~" cipher="aes-xts-plain" noroot="1" options=""/>

to /etc/security/pam_mount.conf.xml. Using noroot="1" lets mount.crypt always crash (at least I haven't had a successful mount). Leaving it out, i.e. mounting as root, lets it work sometimes, but mostly it fails, too.

Revision history for this message
jhansonxi (jhansonxi) wrote :

I'm encountering this on a new Jaunty server I set up so it's not a battery-related issue. I have an encrypted LVM volume that is supposed to mount the user's home directory via pam_mount. I enter the password and get a command prompt but the mount fails. Kernel reports:

[ 1148.939559] mount.crypt[3796]: segfault at fffffffffffffffc ip 00007f82c5da0cfd sp 00007fffce1c4a70 error 4 in libHX.so.14.2.0[7f82c5d9b000+b000]
[ 1149.635703] mount.crypt[3802]: segfault at fffffffffffffffc ip 00007fae4424ecfd sp 00007fff4c672f30 error 4 in libHX.so.14.2.0[7fae44249000+b000]

This occurs at every login and logout. The pam_mount config section is:

     <volume user="wineuser"
 fstype="crypt"
 path="/dev/mapper/vg0-lv4"
        mountpoint="/home/wineuser"
        options="defaults,fsck"
 fskeycipher="aes-256-ecb"
        fskeypath="/etc/keys/dm-crypt/wineuser_crypt.key"
    />

Manually mounting it via mount.crypt works:

root@jhansonxi-s2:/home/administrator/Install# cat mount.crypt.sh
#! /bin/sh
mount.crypt -v -o keyfile="/etc/keys/dm-crypt/wineuser_crypt.key",fsk_cipher="aes-256-ecb",fsk_hash="md5" /dev/mapper/vg0-lv4 /home/wineuser
root@jhansonxi-s2:/home/administrator/Install# ./mount.crypt.sh
command: [readlink] [-fn] [/dev/mapper/vg0-lv4]
command: [readlink] [-fn] [/home/wineuser]
Password:
mount.crypt(loop.c:319): Using _dev_mapper_vg0_lv4 as dmdevice name
command: [cryptsetup] [luksOpen] [/dev/mapper/vg0-lv4] [_dev_mapper_vg0_lv4]
key slot 0 unlocked.
Command successful.
command: [mount] [-n] [/dev/mapper/_dev_mapper_vg0_lv4] [/home/wineuser]
root@jhansonxi-s2:/home/administrator/Install# umount.crypt /home/wineuser
root@jhansonxi-s2:/home/administrator/Install#

Revision history for this message
jhansonxi (jhansonxi) wrote :

I'm not currently having crash issues with Ubuntu 10.04 Lucid Lynx x86.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libpam-mount (Ubuntu):
status: New → Confirmed
Changed in libpam-mount (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.