[Bug 927828] Re: sudo: pam_mount.c:417: modify_pm_count: Assertion `user != ((void *)0)' failed.
Jari Laamanen
yartsa at clovermail.net
Mon May 7 20:05:33 UTC 2012
I have sudo 1.8.3p1-1ubuntu3.1 from precise-proposed and I use pam_mount
for mounting encrypted partitions at login.
While the original bug is fixed with the 1ubuntu3.1 version of sudo,
'sudoedit' command triggers pam_mount to enquire the password of the
encrypted partition, trying to mount it and later to umount it. Mounting
and umounting fails, because the encrypted partition is already mounted,
unlocked and busy.
$ sudoedit test
reenter password for pam_mount:
pam_mount(mount.c:69): Messages from underlying mount program:
pam_mount(mount.c:73): crypt_activate_by_passphrase: File exists
pam_mount(pam_mount.c:521): mount of /dev/myvolumehere/mypartitionhere failed
pam_mount(mount.c:69): umount messages:
pam_mount(mount.c:73): umount: /mnt/mymountedpartition: device is busy.
pam_mount(mount.c:73): (In some cases useful info about processes that use
pam_mount(mount.c:73): the device is found by lsof(8) or fuser(1))
pam_mount(mount.c:73): umount /mnt/mymountedpartition failed with run_sync status 1
pam_mount(mount.c:73): umount: /mnt/mymountedpartition: device is busy.
pam_mount(mount.c:73): (In some cases useful info about processes that use
pam_mount(mount.c:73): the device is found by lsof(8) or fuser(1))
pam_mount(mount.c:73): umount /mnt/mymountedpartition failed with run_sync status 1
pam_mount(mount.c:752): unmount of /dev/myvolumehere/mypartitionhere failed
sudo does not trigger this behavior, just sudoedit.
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/927828
Title:
sudo: pam_mount.c:417: modify_pm_count: Assertion `user != ((void
*)0)' failed.
Status in sudo:
Unknown
Status in “libpam-mount” package in Ubuntu:
Invalid
Status in “sudo” package in Ubuntu:
Fix Released
Status in “libpam-mount” source package in Precise:
Invalid
Status in “sudo” source package in Precise:
Fix Committed
Status in “sudo” package in Debian:
New
Bug description:
Stable Release Update request
[Impact]
Pluggable Authentication Module (PAM) pam_open_session() is not called by sudo when a timestamp is still valid (currently 15 minutes) leading to unexpected behaviour and (sometimes hidden) failures of PAM session modules. The issue will affect *all* PAMs although it is revealed by libpam-mount through this assert() causing an Abort.
Due to significant code refactoring to support a plug-in architecture
upstream between the Oneiric (1.7.4p6) and Precise (1.8.3p1) versions
of sudo a hidden bug in sudo's use of the PAM library has been
revealed by systems that have libpam-mount installed. This is only
installed as a reverse dependency of sadms or else manually to support
auto-mounting of user encfs volumes. The issue will affect *all*
PAMs.
[Development Fix]
I reported the bug to upstream sudo and Rob Miller (upstream author) promptly investigated and published a patch against upstream's development tip and the imminent 1.8.5 release candidate. The patch fixes the issue for upstream.
[Stable Fix]
Backporting the upstream fix required moving patch hunks around to different files to account for the changes since Precise's 1.8.3p1. Although transformed, the patch doesn't add or remove any additional logic - it just accounts for variable name-changes and code that had moved to alternate functions. The patch is on my linked bzr branch.
[Test Case]
1. Install libpam-mount
2. Repeatedly run sudo within the default 15 minute timestamp caching window
sudo apt-get install libpam-mount
sudo echo TEST
sudo echo TEST
sudo echo TEST
[Regression Potential]
No regression potential. Returns functional behaviour to that expected by PAMs .
--- Original Report ---
When running sudo it executes properly the first time during a session but, after credentials are cached, further attempts result in an error:
sciri at Rico:~$ sudo id
[sudo] password for sciri:
uid=0(root) gid=0(root) groups=0(root)
sciri at Rico:~$ sudo id
uid=0(root) gid=0(root) groups=0(root)
sudo: pam_mount.c:417: modify_pm_count: Assertion `user != ((void *)0)' failed.
Aborted
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libpam-mount 2.10-2
ProcVersionSignature: Ubuntu 3.2.0-14.23-generic 3.2.3
Uname: Linux 3.2.0-14-generic x86_64
NonfreeKernelModules: nvidia wl
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
CheckboxSubmission: 15c9c9b122c9273f52b28c9a5df794ac
CheckboxSystem: 7e42599bda39ea7ff8b528272b6ef52b
Date: Mon Feb 6 14:21:24 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64+mac (20110901)
SourcePackage: libpam-mount
UpgradeStatus: Upgraded to precise on 2012-02-06 (0 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/sudo/+bug/927828/+subscriptions
More information about the Ubuntu-sponsors
mailing list