Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #85164

Bug#1092591: linux-image-6.12.6-amd64: SO_PEERSEC fails with ENOPROTOOPT with AppArmor enabled

From Guido Berhoerster <guido+debian@berhoerster.name>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#1092591: linux-image-6.12.6-amd64: SO_PEERSEC fails with ENOPROTOOPT with AppArmor enabled
Date 2025-01-16 14:30 +0100
Message-ID <K5y6B-9mFR-1@gated-at.bofh.it> (permalink)
References <K30sp-6TAG-3@gated-at.bofh.it> <K30sp-6TAG-3@gated-at.bofh.it> <K30sp-6TAG-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


From my superficial reading of the code the error seems to come from here: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/security/apparmor/lsm.c?h=v6.12.6#n1313

It appears that AppArmor SO_PEERSEC support for unix domain sockets bound to a filesystem path name is missing from the upstream kernel and is only enabled as a side effect of a patch distributed with AppArmor: https://gitlab.com/apparmor/apparmor/-/blob/692e6850ba90582105713a683bed753bad696aab/kernel-patches/v4.17/0002-apparmor-af_unix-mediation.patch
Ubuntu kernels contain a rebased variant of the patch which is likely why SO_PEERSEC works on Ubuntu.

The reason I stumbled on this issue is that we (ubports-team) are currently packaging lomiri-content-hub which implicitly relies on SO_PEERSEC through the DBus daemon to get the AppArmor profile of a process requesting to export a file. Without this it is not possible to confine Lomiri/Ubuntu Touch apps running on Debian.
-- 
Guido Berhoerster

Back to linux.debian.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#1092591: linux-image-6.12.6-amd64: SO_PEERSEC fails with ENOPROTOOPT with AppArmor enabled Guido Berhoerster <guido+debian@berhoerster.name> - 2025-01-09 14:10 +0100
  Bug#1092591: linux-image-6.12.6-amd64: SO_PEERSEC fails with ENOPROTOOPT with AppArmor enabled Guido Berhoerster <guido+debian@berhoerster.name> - 2025-01-16 14:30 +0100
    Bug#1092591: linux-image-6.12.6-amd64: SO_PEERSEC fails with ENOPROTOOPT with AppArmor enabled Bastian Blank <waldi@debian.org> - 2025-01-17 19:30 +0100
      Bug#1092591: linux-image-6.12.6-amd64: SO_PEERSEC fails with ENOPROTOOPT with AppArmor enabled Guido Berhoerster <guido+debian@berhoerster.name> - 2025-01-20 13:10 +0100
        Bug#1092591: linux-image-6.12.6-amd64: SO_PEERSEC fails with ENOPROTOOPT with AppArmor enabled Salvatore Bonaccorso <carnil@debian.org> - 2025-01-31 07:00 +0100
  Processed: Re: Bug#1092591: linux-image-6.12.6-amd64: SO_PEERSEC  fails with ENOPROTOOPT with AppArmor enabled "Debian Bug Tracking System" <owner@bugs.debian.org> - 2025-01-17 19:30 +0100

csiph-web