🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #7016

Bug#1099688: apparmor DENIED for ~/.pki/nssdb/ and Firefox NSS: also breaks signature verification

#7016
From: Riccardo Lancellotti
Date: Tue, 01 Dec 2026 15:00
49 lines
4448 bytes
Hi,
I am experiencing a similar problem with papers 49.8-2 on debian
testing (forky). In particular I am having problem with signature
*verification* (instead of signing).

When opening the a signed pdf, the signer certificate reported as
"issued by an untrusted source", even when the issuing CA is correctly
trusted in the user's NSS database.

Setup: 

1) CA imported as trusted for signatures in ~/.pki/nssdb (certutil -t
",C,"). 
2) pdfsig (unconfined) reports "Certificate is Trusted"; 
3) Papers reports untrusted source and prints:
  NSS_Init failed: security library: bad database.
  NSS_Shutdown failed: NSS could not shutdown. Objects are still in
use.

I checked with strace and journalctl what happens:

1) poppler first tries the Firefox profile NSS DB; the profile denies
  reading ~/.mozilla/firefox/*/cert9.db (EACCES).
2) It then falls back to ~/.pki/nssdb: open is allowed, but locking is
no. 
3) In the journal I have:
  apparmor="DENIED" operation="file_lock" class="file"  
profile="/usr/bin/papers" name="/home/<user>/.pki/nssdb/cert9.db"  
comm="pool-1" requested_mask="k" denied_mask="k" fsuid=1000 ouid=1000

AFAIK cert9.db is SQLite, which needs a shared lock even for reads, so
NSS fails and Papers has no trust anchors.

I added to /etc/apparmor.d/local/usr.bin.papers this lines to fix the
problem

  owner @{HOME}/.pki/nssdb/ r,
  owner @{HOME}/.pki/nssdb/* rk,


Please note that signing will need more (write access, see also
#1120163 for smart card readers), but the rule above could perhaps be
applied first, since it fixes verification for everyone without
widening write access.

-- 
Saluti,
  Riccardo
Technical Details
Message-ID: <O5xuO-flWQ-17@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!bofh.it!news.nic.it!robomod
References: <LO1cl-aQNg-3@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!bofh.it!news.nic.it!robomod
From: Riccardo Lancellotti <rlancellotti@unimore.it>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1099688: apparmor DENIED for ~/.pki/nssdb/ and Firefox NSS: also breaks signature verification
Date: Tue, 01 Dec 2026 16:00:02 +0100
Message-ID: <O5xuO-flWQ-17@gated-at.bofh.it>
References: <LO1cl-aQNg-3@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Tue Dec  1 14:51:07 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.451
Reply-To: Riccardo Lancellotti <rlancellotti@unimore.it>, 1099688@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: pkg-gnome-maintainers@lists.alioth.debian.org
X-Debian-Pr-Message: followup 1099688
X-Debian-Pr-Package: papers
X-Debian-Pr-Source: papers
X-Gm-Message-State: APuU4Z/67q1wfRoFtLUH1/SmzO9EKE3Nn27gZVI29aTxzW+rnUF+r9B0
	Agzq05HA4BPkWRQRMuRog3FM3fOq6gK6l3L358/HFAdGUEycfFMyhCjmvoVGv5hGlECFmH71EwJ
	cUP4qzTc=
X-Gm-Gg: AZFdTZdvauB6isDFOkcGqMAF+x28m++PRiMxc0lr2HksBhZaX2tTFXMszZjCv4v4yaj
	HSV/Zw20mA6Fc6mPVtzFq+7fP7wFZmMkHg83LLneoYFOjmlB05hTGFldfOWk/QgmVGsKFd8mVoD
	e9aIiKtaVWoNpPY9xogKpWNY8cNnTKiDkP56h9TlYKsG/MrJSRRIIJt67H/TQ596CGULTzGejlh
	I3NYuEN8Z3mrvD9AC99K2PAqbvY0UllnN0ZBtMGhUYQg5xp8tjbwOFH04r7tbATykF0QjmoQKsL
	nr0dR9zabewx6zoMVK160vXQvc1HOQ1Xrx4X2DkOcys+H3duAv3DRZ3m4ARFM1pwwlh18vry8OC
	zEsg2ymIil4Ss+KqYwfyvC/Z1h3Uz8eKBwH87oDchU6SzTOBwNnfOFHuhNuNAxilDsX1LJkB0M6
	tZFP0bs8bYLlZoP12xFvsmgSuT2bNvptvuU+z7HoWsnLbvodZo5Atm9f4cdv6Pjp84dbmgul5iS
	37CJNQbGlfOqff5mgoRGkvK8WFWFhfWR0xiZw+CbJbVzSPw+Qiu4ct4KVXqPgLChyLVpUsWCOv2
	7e+EI/vJJ6pf+Vs95I3tI9gH0KikELsMq4aw7lkTeAkMP8LhYCCAL+hDgmaN0w==
X-Received: by 2002:a05:6402:2807:b0:6bb:63f5:d498 with SMTP id 4fb4d7f45d1cf-6bb63f5d691mr12860359a12.13.1796136560447;
        Tue, 01 Dec 2026 06:49:20 -0800 (PST)
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.62.1-4 
MIME-Version: 1.0
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2006311
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 49
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Tue, 01 Dec 2026 15:49:19 +0100
X-Original-Message-ID: <f7e431c2d8bbc571e3b161e8d5187f2c498cc3eb.camel@unimore.it>
X-Original-References: <a62556f368f72847068bf176fb9afc8deabb786c.camel@dia.uned.es>