[Bug 927828] Re: sudo: pam_mount.c:417: modify_pm_count: Assertion `user != ((void *)0)' failed.

Steve Langasek steve.langasek at canonical.com
Tue May 8 06:31:19 UTC 2012


That seems like a bug in pam_mount for not having sensible reference
counting behavior for mounts used by multiple sessions, and not a bug in
the sudo patch.  How does this work if you try to log in twice over ssh
to the same account?

-- 
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