🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Bug#1155406: quassel-core: AppArmor profile missing '/usr/bin/quasselcore mr,' (causes SIGSEGV) and PostgreSQL socket rule

#6243
From: Daniel Albers
Date: Thu, 26 Nov 2026 01:00
92 lines
4662 bytes
This is a multi-part MIME message sent by reportbug.


--===============5345851690729919930==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: quassel-core
Version: 1:0.14.0-6
Severity: important
Tags: patch

Dear Maintainer,

When AppArmor is enabled (apparmor 4.1.8-3+b1, Linux 7.2.8+deb14-amd64),
starting /usr/bin/quasselcore fails immediately with a segmentation fault
before main() is even reached:

  $ /usr/bin/quasselcore -v
  Segmentation fault

Running under strace shows that execve() is denied by AppArmor:

  $ strace -f /usr/bin/quasselcore -v
  execve("/usr/bin/quasselcore", ["/usr/bin/quasselcore", "-v"], ...) = -1 EACCES (Permission denied)
  +++ killed by SIGSEGV +++

Executing via the dynamic linker bypasses the profile and works as expected:

  $ /lib64/ld-linux-x86-64.so.2 /usr/bin/quasselcore -v
  quassel v0.14.0 (dist-da9c1c9)

Cause:
1. The shipped AppArmor profile /etc/apparmor.d/usr.bin.quasselcore is missing
   the rule allowing the binary to memory-map and read itself:

     /usr/bin/quasselcore mr,

   Adding this rule and reloading the profile immediately resolves the startup
   crash and allows quasselcore to run in enforce mode.

2. In addition, when using the PostgreSQL storage backend over the local Unix
   socket (/var/run/postgresql), AppArmor blocks the socket connection unless
   the profile allows:

     /{,var/}run/postgresql/.s.PGSQL.* rw,

A patch for debian/usr.bin.quasselcore adding both rules is attached.


-- System Information:
Debian Release: 13.7
  APT prefers stable-updates
  APT policy: (700, 'stable-updates'), (700, 'stable-security'), (700, 'stable'), (500, 'testing'), (500, 'oldstable'), (200, 'unstable'), (100, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 7.2.8+deb14-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_CPU_OUT_OF_SPEC, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.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

--===============5345851690729919930==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="quassel-core-apparmor.patch"

--- a/debian/usr.bin.quasselcore
+++ b/debian/usr.bin.quasselcore
@@ -14,11 +14,16 @@
   #include <abstractions/ssl_certs>
   #include <abstractions/ssl_keys>
 
+  /usr/bin/quasselcore mr,
+
   /var/lib/quassel/ rw,
   /var/lib/quassel/** rwkl,
 
   /var/log/quassel/* rw,
 
+  # PostgreSQL storage backend over local Unix socket
+  /{,var/}run/postgresql/.s.PGSQL.* rw,
+
   /etc/xdg/Trolltech.conf r,
   deny /etc/xdg/Trolltech.conf k,
 

--===============5345851690729919930==--
Technical Details
Message-ID: <O3w09-eaDt-3@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lon.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lon.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Daniel Albers <daniel@lbe.rs>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1155406: quassel-core: AppArmor profile missing '/usr/bin/quasselcore mr,' (causes SIGSEGV) and PostgreSQL socket rule
Date: Thu, 26 Nov 2026 02:00:01 +0100
Message-ID: <O3w09-eaDt-3@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 Nov 26 00:55:07 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.451
Reply-To: Daniel Albers <daniel@lbe.rs>, 1155406@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: pkg-kde-extras@lists.alioth.debian.org
X-Debian-Pr-Message: report 1155406
X-Debian-Pr-Package: quassel-core
X-Debian-Pr-Keywords: patch
X-Debian-Pr-Source: quassel
Content-Type: multipart/mixed; boundary="===============5345851690729919930=="
MIME-Version: 1.0
X-Mailer: reportbug 13.2.0
X-Greylist: delayed 1851 seconds by postgrey-1.37 at buxtehude; Thu, 26 Nov 2026 00:52:49 UTC
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2005114
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 92
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Thu, 26 Nov 2026 01:20:41 +0100
X-Original-Message-ID: <179565244153.3950407.12355561258866068134.reportbug@fourrooms.bandsal.at>