Article View: linux.debian.bugs.dist
Article #7362Bug#1156283: opencryptoki: pkcsslotd.service fails to start under systemd 263 (ProtectSystem=strict makes /run/opencryptoki read...
From: Giacomo Mulas
Date: Thu, 03 Dec 2026 19:00
Date: Thu, 03 Dec 2026 19:00
113 lines
7257 bytes
7257 bytes
Package: opencryptoki Version: 3.27.0-1 Severity: normal Package: opencryptoki Version: 3.27.0-1 Severity: important Subject: opencryptoki: pkcsslotd.service fails to start under systemd 263 (ProtectSystem=strict makes /run/opencryptoki read-only) Dear Maintainer, After upgrading systemd from 262.2-1 to 263~rc1 (now 263~rc1-2), pkcsslotd.service no longer starts: systemd[1]: Starting pkcsslotd.service - Daemon which manages cryptographic hardware tokens for the openCryptoki package... systemd[1]: pkcsslotd.service: Control process exited, code=exited, status=3/NOTIMPLEMENTED systemd[1]: pkcsslotd.service: Failed with result 'exit-code'. pkcsslotd itself logs nothing. Started by hand as root, outside systemd, the daemon starts and runs normally (it switches to the pkcsslotd user and creates its PID file and sockets). With systemd 262.2-1 the unit started fine; the first start under 263~rc1 is the first failure. Neither opencryptoki nor its unit file changed (both dated 2026-06-29). To find the cause I started the unit with a runtime drop-in that relaxed one sandboxing option at a time: no change fails (status 3) MemoryDenyWriteExecute=no fails SystemCallFilter= (reset) fails PrivateDevices=no fails ProtectSystem=no STARTS ProtectHome=no fails PrivateTmp=no fails RestrictAddressFamilies= (reset) fails IPAddressDeny= (reset) fails RestrictNamespaces=no fails NoNewPrivileges=no fails RemoveIPC=no fails ProtectProc/ProcSubset fails ProtectKernel*/ProtectClock/ProtectControlGroups=no fails RestrictSUIDSGID/RestrictRealtime/LockPersonality=no fails all of the above relaxed STARTS So the only relevant option is ProtectSystem=strict. The unit allows writes only through ReadWritePaths=/var, but pkcsslotd needs to write to: /run/opencryptoki/pkcsslotd.pid /run/opencryptoki/pkcsslotd.socket /run/opencryptoki/pkcsslotd.admin.socket /var/lock/opencryptoki/ (/var/lock is a symlink to /run/lock) Presumably systemd < 263 let these writes through (perhaps via the /var/run -> /run and /var/lock -> /run/lock symlinks under the writable /var), while 263 no longer does. Either way, the unit relies on paths under /run that it does not declare. This drop-in fixes it while keeping the rest of the sandbox: # /etc/systemd/system/pkcsslotd.service.d/run-writable.conf [Service] ReadWritePaths=/run/opencryptoki /run/lock/opencryptoki With it, the service starts normally: pkcsslotd[...]: PID file (/run/opencryptoki/pkcsslotd.pid) created Suggested fix: add the two /run paths to ReadWritePaths= in pkcsslotd.service. RuntimeDirectory= would be an alternative, but it would conflict with the ownership and mode that tmpfiles.d/opencryptoki.conf sets for /run/opencryptoki (710 pkcsslotd:pkcs11) and /var/lock/opencryptoki (0770 root:pkcs11). The systemd maintainers may want to know about this as well, since the behaviour change comes from the upgrade to 263~rc1, but the missing paths are in this package's unit file. Best regards Giacomo Mulas -- System Information: Debian Release: forky/sid APT prefers unstable APT policy: (401, 'unstable'), (10, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 7.3.6+deb14-amd64 (SMP w/12 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages opencryptoki depends on: ii adduser 3.161 ii libc6 2.43-8 ii libcap2 1:2.78-1+b2 ii libldap2 2.6.14+dfsg-2+b1 ii libopencryptoki0 3.27.0-1 ii libssl3t64 3.6.5-2 ii systemd [systemd-tmpfiles] 263~rc1-2 opencryptoki recommends no packages. opencryptoki suggests no packages. -- Configuration Files: /etc/opencryptoki/strength.conf [Errno 13] Permesso negato: '/etc/opencryptoki/strength.conf' -- no debconf information
Technical Details
Message-ID:
<O6kc9-fN3M-13@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-fra.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.hispagatos.org!news.samoylyk.net!gothmog.csi.it!news.servidellagleba.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.hispagatos.org!news.samoylyk.net!gothmog.csi.it!news.servidellagleba.it!bofh.it!news.nic.it!robomod
From: Giacomo Mulas <giacomo.mulas@inaf.it>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1156283: opencryptoki: pkcsslotd.service fails to start under systemd 263 (ProtectSystem=strict makes /run/opencryptoki read-only)
Date: Thu, 03 Dec 2026 20:00:01 +0100
Message-ID: <O6kc9-fN3M-13@gated-at.bofh.it>
X-Original-To: Debian Bug Tracking System <submit@bugs.debian.org>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Thu Dec 3 18:59:09 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.451
Reply-To: Giacomo Mulas <giacomo.mulas@inaf.it>, 1156283@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: packages@qa.debian.org
X-Debian-Pr-Message: report 1156283
X-Debian-Pr-Package: opencryptoki
X-Debian-Pr-Source: opencryptoki
X-Gm-Message-State: APuU4Z8/B2zmwQXodcSAdfaRR6IRmch06Xom+oiLSg/9B0yP109vQk/k
/dzKFlXYrh6eepYfqkLTpAC22a5Nw4i5mkZIn0TdfFVH5LGNtQoMy5JbE+ThZ67DTaQG4k8CcP9
oFn01e05o3w==
X-Gm-Gg: AZFdTZfWo+pO6raf06qSRrlhsnEyD4puEgGNpD8dX1UaqVRSfiBVLocl/DKyyphvKdu
dAqFF4wmZVtAOt0o15u4KFJVyrLNm83IkFzTD2RynjB8xbgiAjYv5yWE7tupskJymsqoVQa3rY/
nTj163SR7n6breRA9lwkp0Pkz5gDhVMbMzlvlIydsG0YXP4ouoFDirl5wTcqXK8TZG44PkIeiEl
ox6Xq749odxlU6JwSu8pmb0PJyq+/eSzbJ+NOwjd6gpjTf8U4GQfmtJcDEKpxe0jDWolNtWxjHz
ZfLnWsjuuDuAFK1PyT/D/SQV7z8zBCAQ3V9XpjaC0XJaZPj0IeKLDDH9gBF8jA+F6aTQ2TqiLNZ
xeCTngcQhClSVv0Nwr5aANdTjnzRTlyicmVw/kJyBBzHMeAtMQLLgIrFhplZAshncJOoDmJv5q4
PFNrq30pAAHmDR1McIo5/JdMvWl2ksMWcVq4k5v6Nuwpabj0SYV6U9rP8+5CZpzEizAeHPj8cbl
x2iMDYFWHAZQ7HBtPtCJAH2JYj/aXtPVZOLRvJB5Cf5t5y+o2Z8+3SJy+7GS9hfBo3fmprsBbrD
bwlRjZ0vpVEt20l3DjB+SB6n/fUPqv4/3ge+pHjjSFIsaCQ0tTYSqLUz78qkjcmR+Z4n5h32326
2mz+JByo=
X-Received: by 2002:a5d:64ef:0:b0:4a7:5eea:fd1b with SMTP id ffacd0b85a97d-4abb954dafcmr86521612f8f.49.1796324280304;
Thu, 03 Dec 2026 10:58:00 -0800 (PST)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Mailer: reportbug 13.2.0+nmu1
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2006800
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 113
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Thu, 03 Dec 2026 19:57:59 +0100
X-Original-Message-ID: <179632427935.54320.1649020696196847149.reportbug@capitanata.oa-cagliari.inaf.it>