Your message dated Tue, 27 Oct 2026 06:19:20 +0000
with message-id <[email protected]>
and subject line Bug#939357: fixed in sudo 1.9.17p2-9exp2
has caused the Debian Bug report #939357,
regarding sudo: /etc/pam.d/sudo doesn't create a new keyring session
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
939357: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=939357
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: sudo
Version: 1.8.19p1-2.1
Severity: normal
X-Debbugs-CC: Luc Maisonobe <[email protected]>
X-Debbugs-CC: Jonas Meurer <[email protected]>

Dear Maintainer,

sudo's pam config doesn't create a new keyring session for the processes
it spawns. This leads to problems with programs that try to add things
to the keyring, because they try to modify the user's keyring, which
even root doesn't have permission to do. An example of this was
mentioned in this previous bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758788#45

> On the first invocation (for cont1_crypt), I got this dialog:
>
> root@marislae:~# cryptdisks_start cont1_crypt
> [[....] Starting crypto disk...[info] cont1_crypt (starting)...
> Caching passphrase for /cont1:  ******
> keyctl_set_timeout: Permission denied
> Error setting timeout on key (2524288), removing
> Caching passphrase for /cont1:  ******
> keyctl_set_timeout: Permission denied
> Error setting timeout on key (612589418), removing
>
> [Here I pressed <ctrl-C> to stop the attempts]
>
> Caching passphrase  for /cont1:  Erreur de lecture de la phrase secrète.
>
>
> I was running the commands from root. I initially logged in to the
> computer from SSH to a regular user, than did "sudo -i" to get root
> access if this matters. As I suspected this may be a problem, I allowed
> root direct SSH access and tried again, login directly to root account,
> this time it worked:
>
> root@marislae:~# cryptdisks_start cont1_crypt
> [....] Starting crypto disk...[info] cont1_crypt (starting)...
> Caching passphrase for /cont1:  ******
> [ ok _crypt (started)...done.
> root@marislae:~# cryptdisks_start cont2_crypt
> [....] Starting crypto disk...[info] cont2_crypt (starting)...
> Using cached passphrase for /cont2.
> [ ok _crypt (started)...done.

It turns out that this works when logged in as root via SSH because this
line in `/etc/pam.d/sshd` sets up a new session keyring for the root
user:

> # Create a new session keyring.
> session    optional     pam_keyinit.so force revoke


The same line is also present in `/etc/pam.d/runuser-l`, so I've been
working around this problem by running cryptdisks_start via `sudo
runuser -l`, as in:

> sudo runuser -l root -c 'cryptdisks_start c1 && cryptdisks_start c2 && #
so on'


Given that it's not useful for a process running on the root user to try to
manipulate the user's session keyring, I think it would make sense for
/etc/pam.d/sudo to force the creation of a new one, or at least for `sudo
-i` to force the creation of a new one via a `/etc/pam.d/sudo-i` config
file, similar to `runuser -l`.

Thanks,
Simon

-- System Information:
Debian Release: 9.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (102, 'testing'),
(101, 'unstable'), (100, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-7-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8),
LANGUAGE=en_CA:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages sudo depends on:
ii  libaudit1       1:2.6.7-2
ii  libc6           2.27-5
ii  libpam-modules  1.1.8-3.6
ii  libpam0g        1.1.8-3.6
ii  libselinux1     2.6-3+b3
ii  lsb-base        9.20161125

sudo recommends no packages.

sudo suggests no packages.

-- Configuration Files:
/etc/sudoers [Errno 13] Permission denied: '/etc/sudoers'
/etc/sudoers.d/README [Errno 13] Permission denied: '/etc/sudoers.d/README'

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: sudo
Source-Version: 1.9.17p2-9exp2
Done: Marc Haber <[email protected]>

We believe that the bug you reported is fixed in the latest version of
sudo, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Marc Haber <[email protected]> (supplier of updated sudo package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 27 Oct 2026 06:39:22 +0100
Source: sudo
Architecture: source
Version: 1.9.17p2-9exp2
Distribution: experimental
Urgency: medium
Maintainer: Debian Sudo Maintainers <[email protected]>
Changed-By: Marc Haber <[email protected]>
Closes: 906752 939357
Changes:
 sudo (1.9.17p2-9exp2) experimental; urgency=medium
 .
   * add pam_keyinit to pam.d snippets.
     Thanks to Simon Ruggier <[email protected]>, Sebastian Mohr 
<[email protected]>, Guilhem Moulin <[email protected]>
     (Closes: #906752, #939357)
Checksums-Sha1:
 3ab59577100c4e682ca415eedc0b7dcb23b7e77e 1980 sudo_1.9.17p2-9exp2.dsc
 a8a2b088b164e314551faf36f9bbba19a0d511d6 53640 
sudo_1.9.17p2-9exp2.debian.tar.xz
 b09ba0b981e4de93f47147ae973566a7198f7cb8 5211 
sudo_1.9.17p2-9exp2_source.buildinfo
Checksums-Sha256:
 c4ef3667fe2b5513459106238f9b5cc958fc6fbcd96263a7dbd94d87b63f5b19 1980 
sudo_1.9.17p2-9exp2.dsc
 75f4ccc63f553064dc86b1cba31d547278f77e9a98c13dd5082a76624d5751f4 53640 
sudo_1.9.17p2-9exp2.debian.tar.xz
 85ffc67c4b37d225748b9669eecfa26d73a4ac8d06f834301119a643d7d7cd22 5211 
sudo_1.9.17p2-9exp2_source.buildinfo
Files:
 d50976af5d5776fe6b1900a4e01f01ae 1980 admin optional sudo_1.9.17p2-9exp2.dsc
 ea47078e6d9a1ad6108e4faf7b68184e 53640 admin optional 
sudo_1.9.17p2-9exp2.debian.tar.xz
 f41ea61f785d4ea6eb9650b2cd4f1a8a 5211 admin optional 
sudo_1.9.17p2-9exp2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iJYEARYKAD4WIQRoUtdjQYCq5giMg+rVTTAMN2ORyQUCauA5xSAcbWgrZGViaWFu
LXBhY2thZ2VzQHp1Z3NjaGx1cy5kZQAKCRDVTTAMN2ORycNeAP4h5yMYphPaTu6z
CPfnTzIqzE5UlJUDkMpShbBYiBYpWQEA1NlzDQG4zDO5BDQLJoRbI9y0T2FKYjFi
TkKmBgoi5wI=
=CbUo
-----END PGP SIGNATURE-----

Attachment: pgpzNyhASdoAD.pgp
Description: PGP signature


--- End Message ---

Reply via email to