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


Groups > linux.debian.kernel > #81082 > unrolled thread

Bug#1050256: AppArmor breaks locking non-fs Unix sockets

Started bySalvatore Bonaccorso <carnil@debian.org>
First post2023-12-06 23:00 +0100
Last post2025-06-14 22:10 +0200
Articles 10 — 2 participants

Back to article view | Back to linux.debian.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Bug#1050256: AppArmor breaks locking non-fs Unix sockets Salvatore Bonaccorso <carnil@debian.org> - 2023-12-06 23:00 +0100
    Bug#1050256: AppArmor breaks locking non-fs Unix sockets Salvatore Bonaccorso <carnil@debian.org> - 2023-12-30 16:50 +0100
      Bug#1050256: AppArmor breaks locking non-fs Unix sockets Salvatore Bonaccorso <carnil@debian.org> - 2024-01-27 10:30 +0100
      Bug#1050256: AppArmor breaks locking non-fs Unix sockets Luca Boccassi <bluca@debian.org> - 2024-05-21 19:10 +0200
      Bug#1050256: AppArmor breaks locking non-fs Unix sockets Salvatore Bonaccorso <carnil@debian.org> - 2024-05-26 13:50 +0200
        Bug#1050256: AppArmor breaks locking non-fs Unix sockets Luca Boccassi <bluca@debian.org> - 2024-05-26 18:10 +0200
        Bug#1050256: AppArmor breaks locking non-fs Unix sockets Salvatore Bonaccorso <carnil@debian.org> - 2024-08-03 21:40 +0200
          Bug#1050256: AppArmor breaks locking non-fs Unix sockets Salvatore Bonaccorso <carnil@debian.org> - 2024-11-29 22:20 +0100
            Bug#1050256: AppArmor breaks locking non-fs Unix sockets Salvatore Bonaccorso <carnil@debian.org> - 2025-03-22 20:00 +0100
              Bug#1050256: AppArmor breaks locking non-fs Unix sockets Salvatore Bonaccorso <carnil@debian.org> - 2025-06-14 22:10 +0200

#81082 — Bug#1050256: AppArmor breaks locking non-fs Unix sockets

FromSalvatore Bonaccorso <carnil@debian.org>
Date2023-12-06 23:00 +0100
SubjectBug#1050256: AppArmor breaks locking non-fs Unix sockets
Message-ID<HI85X-bOgB-9@gated-at.bofh.it>
Hi Paul,

On Wed, Dec 06, 2023 at 10:21:02PM +0100, Paul Gevers wrote:
> Hi,
> 
> On Mon, 18 Sep 2023 20:54:17 +0200 Paul Gevers <elbrus@debian.org> wrote:
> > On 09-09-2023 13:06, Paul Gevers wrote:
> > > All ci.d.n workers (except riscv64) now run the kernel from >
> > bookworm-backports. systemd passes it's autopkgtest again in unstable, >
> > testing and stable.
> > 
> > We're having issues [1] with the (backports and) unstable kernel on our
> > main amd64 host, so we reverted back to the stable kernel for amd64.
> > 
> > Paul
> > 
> > [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1052130
> 
> We're having issues [2] with the backports kernel on arm64 so our arm64,
> armhf and armel hosts are back to the previous backports (arm64) kernel.
> 
> I'm slightly wondering if the next point release (on Saturday) will bring us
> a fixed kernel for this issue? Given that this is the second time in 3
> months we experience an issue with backports kernels, I think we'll have to
> revert our hosts back to stable kernels for maintainability reasons.

TTBOMK, a backport of 1cf26c3d2c4c ("apparmor: fix apparmor mediating
locking non-fs unix sockets") for the 6.1.y stable series has not
landed yet so it's not included in the 6.1.64-1 update of the upcoming
point release next weekend.

John, as it was said you are working on having the fix backpored to
linux-6.1.y, is this still WIP?

Regards,
Salvatore

[toc] | [next] | [standalone]


#81373

FromSalvatore Bonaccorso <carnil@debian.org>
Date2023-12-30 16:50 +0100
Message-ID<HQJL3-haEJ-3@gated-at.bofh.it>
In reply to#81082
Hi John,

On Wed, Dec 06, 2023 at 10:47:45PM +0100, Salvatore Bonaccorso wrote:
> Hi Paul,
> 
> On Wed, Dec 06, 2023 at 10:21:02PM +0100, Paul Gevers wrote:
> > Hi,
> > 
> > On Mon, 18 Sep 2023 20:54:17 +0200 Paul Gevers <elbrus@debian.org> wrote:
> > > On 09-09-2023 13:06, Paul Gevers wrote:
> > > > All ci.d.n workers (except riscv64) now run the kernel from >
> > > bookworm-backports. systemd passes it's autopkgtest again in unstable, >
> > > testing and stable.
> > > 
> > > We're having issues [1] with the (backports and) unstable kernel on our
> > > main amd64 host, so we reverted back to the stable kernel for amd64.
> > > 
> > > Paul
> > > 
> > > [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1052130
> > 
> > We're having issues [2] with the backports kernel on arm64 so our arm64,
> > armhf and armel hosts are back to the previous backports (arm64) kernel.
> > 
> > I'm slightly wondering if the next point release (on Saturday) will bring us
> > a fixed kernel for this issue? Given that this is the second time in 3
> > months we experience an issue with backports kernels, I think we'll have to
> > revert our hosts back to stable kernels for maintainability reasons.
> 
> TTBOMK, a backport of 1cf26c3d2c4c ("apparmor: fix apparmor mediating
> locking non-fs unix sockets") for the 6.1.y stable series has not
> landed yet so it's not included in the 6.1.64-1 update of the upcoming
> point release next weekend.
> 
> John, as it was said you are working on having the fix backpored to
> linux-6.1.y, is this still WIP?

John, did you had a chance to work on this backport for 6.1.y stable
upstream so we could pick it downstream in Debian in one of the next
stable imports? Cherry-picking 1cf26c3d2c4c ("apparmor: fix apparmor
mediating locking non-fs unix sockets") does not work, if not
havinging the work around e2967ede2297 ("apparmor: compute policydb
permission on profile load") AFAICS, so that needs a 6.1.y specific
backport submitted to stable@vger.kernel.org ?

I think we could have people from this bug as well providing a
Tested-by when necessary. I'm not feeling confident enough to be able
to provide myself such a patch to sent to stable (and you only giving
an Acked-by/Reviewed-by), so if you can help out here with your
upstream hat on that would be more than appreciated and welcome :)

Thanks a lot for your work!

Regards,
Salvatore

[toc] | [prev] | [next] | [standalone]


#81671

FromSalvatore Bonaccorso <carnil@debian.org>
Date2024-01-27 10:30 +0100
Message-ID<I0NaF-5THw-1@gated-at.bofh.it>
In reply to#81373
Hi John,

On Sun, Dec 31, 2023 at 04:24:47AM +0000, Mathias Gibbens wrote:
> On Sat, 2023-12-30 at 16:44 +0100, Salvatore Bonaccorso wrote:
> > John, did you had a chance to work on this backport for 6.1.y stable
> > upstream so we could pick it downstream in Debian in one of the next
> > stable imports? Cherry-picking 1cf26c3d2c4c ("apparmor: fix apparmor
> > mediating locking non-fs unix sockets") does not work, if not
> > havinging the work around e2967ede2297 ("apparmor: compute policydb
> > permission on profile load") AFAICS, so that needs a 6.1.y specific
> > backport submitted to stable@vger.kernel.org ?
> > 
> > I think we could have people from this bug as well providing a
> > Tested-by when necessary. I'm not feeling confident enough to be able
> > to provide myself such a patch to sent to stable (and you only giving
> > an Acked-by/Reviewed-by), so if you can help out here with your
> > upstream hat on that would be more than appreciated and welcome :)
> > 
> > Thanks a lot for your work!
> 
>   I played around with this a bit the past week as well, and came to
> the same conclusion as Salvatore did that commits e2967ede2297 and
> 1cf26c3d2c4c need to be cherry-picked back to the 6.1 stable tree.
> 
>   I've attached the two commits rebased onto 6.1.y as patches to this
> message. Commit e2967ede2297 needed a little bit of touchup to apply
> cleanly, and 1cf26c3d2c4c just needed adjustments for line number
> changes. I included some comments at the top of each patch.
> 
>   With these two commits cherry-picked on top of the 6.1.69 kernel, I
> can boot a bookworm system and successfully start a service within a
> container that utilizes `PrivateNetwork=yes`. Rebooting back into an
> unpatched vanilla 6.1.69 kernel continues to show the problem.
> 
>   While I didn't see any immediate issues (ie, `aa-status` and log
> files looked OK), I don't understand the changes in the first commit
> well enough to be confident in sending these patches for inclusion in
> the upstream stable tree on my own.

Do you had a chance to look at this for 6.1.y upstream?

Asking/Poking since the point release dates are now clear:

https://lists.debian.org/debian-security/2024/01/msg00005.html

if possible I would like to include those fixes, but only if they are
at least queued fror 6.1.y itself to not diverge from upstream.

Otherwise we will wait another round, but which means usually 2 months
for the point release cadence.

Regards,
Salvatore

[toc] | [prev] | [next] | [standalone]


#82538

FromLuca Boccassi <bluca@debian.org>
Date2024-05-21 19:10 +0200
Message-ID<IGB9U-eTji-5@gated-at.bofh.it>
In reply to#81373

[Multipart message — attachments visible in raw view] — view raw

On Sun, 28 Jan 2024 10:57:03 +0100 Salvatore Bonaccorso
<salvatore.bonaccorso@gmail.com> wrote:
> Hi John,
> 
> On Sun, Jan 28, 2024 at 12:43:33AM -0800, John Johansen wrote:
> > On 12/30/23 20:24, Mathias Gibbens wrote:
> > > On Sat, 2023-12-30 at 16:44 +0100, Salvatore Bonaccorso wrote:
> > > > John, did you had a chance to work on this backport for 6.1.y
stable
> > > > upstream so we could pick it downstream in Debian in one of the
next
> > > > stable imports? Cherry-picking 1cf26c3d2c4c ("apparmor: fix
apparmor
> > > > mediating locking non-fs unix sockets") does not work, if not
> > > > havinging the work around e2967ede2297 ("apparmor: compute
policydb
> > > > permission on profile load") AFAICS, so that needs a 6.1.y
specific
> > > > backport submitted to stable@vger.kernel.org ?
> > > > 
> > > > I think we could have people from this bug as well providing a
> > > > Tested-by when necessary. I'm not feeling confident enough to
be able
> > > > to provide myself such a patch to sent to stable (and you only
giving
> > > > an Acked-by/Reviewed-by), so if you can help out here with your
> > > > upstream hat on that would be more than appreciated and welcome
:)
> > > > 
> > > > Thanks a lot for your work!
> > > 
> > >    I played around with this a bit the past week as well, and
came to
> > > the same conclusion as Salvatore did that commits e2967ede2297
and
> > > 1cf26c3d2c4c need to be cherry-picked back to the 6.1 stable
tree.
> > > 
> > >    I've attached the two commits rebased onto 6.1.y as patches to
this
> > > message. Commit e2967ede2297 needed a little bit of touchup to
apply
> > > cleanly, and 1cf26c3d2c4c just needed adjustments for line number
> > > changes. I included some comments at the top of each patch.
> > > 
> > >    With these two commits cherry-picked on top of the 6.1.69
kernel, I
> > > can boot a bookworm system and successfully start a service
within a
> > > container that utilizes `PrivateNetwork=yes`. Rebooting back into
an
> > > unpatched vanilla 6.1.69 kernel continues to show the problem.
> > > 
> > >    While I didn't see any immediate issues (ie, `aa-status` and
log
> > > files looked OK), I don't understand the changes in the first
commit
> > > well enough to be confident in sending these patches for
inclusion in
> > > the upstream stable tree on my own.
> > > 
> > > Mathias
> > 
> > Your backports look good to me, and you can stick my acked-by on
them.
> > The changes are strictly more than necessary for the fix. They are
> > part of a larger change set that is trying to cleanup the runtime
> > code by changing the permission mapping from a runtime operation
> > to something that is done only at policy load/unpack time.
> > 
> > The advantage of this approach is that while it is a larger change
> > than strictly necessary. It is backporting patches that are already
> > upstream, keep the code closer and making backports easier.
> > 
> > Georgia did a minimal backport fix by keeping the version as part
> > of policy and doing the permission mapping at runtime. I have
> > included that patch below. Its advantage is it is a minimal
> > change to fix the issue.
> > 
> > I am happy with either version going into stable. Do you want to
> > send them or do you want me to do it?
> Thanks a lot, that is *really* much appreicated!
> 
> if you can send them that would be great, because think then they
> come
> directly from you, the trust from Greg or Sasha is higher. otherwise
> I
> think they will then explicitly want an ack on that submission thread
> from you (or pointing to this Debian downstream bug).
> 
> Greg will probably want the backport apporach of the two commits if
> it
> feasible and we do not expect regression from it. But you are
> definitively in a better position to judge this :)
> 
> Thanks again!
> 
> Regards,
> Salvatore
> 
> p.s.: feel free to CC us as well in the upstream stable submission.

Hi John,

Is there any update on this? As far as I am aware this patch has not
been sent for backporting yet, so apparmor in 6.1 is still borken, and
the CI still fails because of it.

Is there any chance you could please take care of that, so that we can
finally fix this issue?

Thanks!

-- 
Kind regards,
Luca Boccassi

[toc] | [prev] | [next] | [standalone]


#82577

FromSalvatore Bonaccorso <carnil@debian.org>
Date2024-05-26 13:50 +0200
Message-ID<IIkxX-fXtb-3@gated-at.bofh.it>
In reply to#81373
Hi,

For those watching this bug: John has prepared backports in his tree,
with both approaches:

https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor.git/log/?h=debian-two-patch-1780227

and

https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor.git/log/?h=debian-backport-1780227

(but with the open question which one will be submitted for stable.
From upstream stable point of view probably the two patch backport
approach would be the preferred one).

Regards,
Salvatore

[toc] | [prev] | [next] | [standalone]


#82583

FromLuca Boccassi <bluca@debian.org>
Date2024-05-26 18:10 +0200
Message-ID<IIoBz-g0dY-3@gated-at.bofh.it>
In reply to#82577

[Multipart message — attachments visible in raw view] — view raw

On Sun, 26 May 2024 13:39:07 +0200 Salvatore Bonaccorso
<carnil@debian.org> wrote:
> Hi,
> 
> For those watching this bug: John has prepared backports in his tree,
> with both approaches:
> 
>
https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor.git/log/?h=debian-two-patch-1780227
> 
> and
> 
>
https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor.git/log/?h=debian-backport-1780227
> 
> (but with the open question which one will be submitted for stable.
> From upstream stable point of view probably the two patch backport
> approach would be the preferred one).

Very nice, thank you!

In the meanwhile, I found a way to reliably detecting this and
gracefully skipping it in systemd, so debci is now fixed. However, it
still results in PrivateNetwork= being quietly disabled, so the
backport is still very much needed, as it is a useful security feature.

-- 
Kind regards,
Luca Boccassi

[toc] | [prev] | [next] | [standalone]


#83309

FromSalvatore Bonaccorso <carnil@debian.org>
Date2024-08-03 21:40 +0200
Message-ID<J7sLD-2urX-3@gated-at.bofh.it>
In reply to#82577
Hi John,

On Sun, May 26, 2024 at 01:39:07PM +0200, Salvatore Bonaccorso wrote:
> Hi,
> 
> For those watching this bug: John has prepared backports in his tree,
> with both approaches:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor.git/log/?h=debian-two-patch-1780227
> 
> and
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor.git/log/?h=debian-backport-1780227
> 
> (but with the open question which one will be submitted for stable.
> >From upstream stable point of view probably the two patch backport
> approach would be the preferred one).

We still have tis issue open for 6.1.y upstream TTBOMK. If you are
confident as maintainer with any of the two approaches, would it be
possible to submit them for stable? If the preferred one get then
accepted and queued, we might already cherry-pick the solution for us,
but at this point we can wait for the respective 6.1.y stable version
which will include the fix.

Regards,
Salvatore

[toc] | [prev] | [next] | [standalone]


#84696

FromSalvatore Bonaccorso <carnil@debian.org>
Date2024-11-29 22:20 +0100
Message-ID<JOgz7-czTl-11@gated-at.bofh.it>
In reply to#83309
Hi John,

On Sat, Aug 03, 2024 at 09:35:25PM +0200, Salvatore Bonaccorso wrote:
> Hi John,
> 
> On Sun, May 26, 2024 at 01:39:07PM +0200, Salvatore Bonaccorso wrote:
> > Hi,
> > 
> > For those watching this bug: John has prepared backports in his tree,
> > with both approaches:
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor.git/log/?h=debian-two-patch-1780227
> > 
> > and
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor.git/log/?h=debian-backport-1780227
> > 
> > (but with the open question which one will be submitted for stable.
> > >From upstream stable point of view probably the two patch backport
> > approach would be the preferred one).
> 
> We still have tis issue open for 6.1.y upstream TTBOMK. If you are
> confident as maintainer with any of the two approaches, would it be
> possible to submit them for stable? If the preferred one get then
> accepted and queued, we might already cherry-pick the solution for us,
> but at this point we can wait for the respective 6.1.y stable version
> which will include the fix.

Friendly ping. Any news here?

Regards,
Salvatore

[toc] | [prev] | [next] | [standalone]


#86554

FromSalvatore Bonaccorso <carnil@debian.org>
Date2025-03-22 20:00 +0100
Message-ID<KtceB-7X9v-1@gated-at.bofh.it>
In reply to#84696
Hi John,

On Fri, Nov 29, 2024 at 10:12:52PM +0100, Salvatore Bonaccorso wrote:
> Hi John,
> 
> On Sat, Aug 03, 2024 at 09:35:25PM +0200, Salvatore Bonaccorso wrote:
> > Hi John,
> > 
> > On Sun, May 26, 2024 at 01:39:07PM +0200, Salvatore Bonaccorso wrote:
> > > Hi,
> > > 
> > > For those watching this bug: John has prepared backports in his tree,
> > > with both approaches:
> > > 
> > > https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor.git/log/?h=debian-two-patch-1780227
> > > 
> > > and
> > > 
> > > https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor.git/log/?h=debian-backport-1780227
> > > 
> > > (but with the open question which one will be submitted for stable.
> > > >From upstream stable point of view probably the two patch backport
> > > approach would be the preferred one).
> > 
> > We still have tis issue open for 6.1.y upstream TTBOMK. If you are
> > confident as maintainer with any of the two approaches, would it be
> > possible to submit them for stable? If the preferred one get then
> > accepted and queued, we might already cherry-pick the solution for us,
> > but at this point we can wait for the respective 6.1.y stable version
> > which will include the fix.
> 
> Friendly ping. Any news here?

Anything we can do there to help on the decision which set of fixes
could land in the 6.1.y stable series? Would it help if I prod Mathias
to test both variants for feedback? 

Or is there a problem you envision already by trying to backport those
fixes to upstream 6.1.y?

Thanks for your work, and sorry for pestering you again about it :(

Regards,
Salvatore

[toc] | [prev] | [next] | [standalone]


#87980

FromSalvatore Bonaccorso <carnil@debian.org>
Date2025-06-14 22:10 +0200
Message-ID<KXFmp-azUr-5@gated-at.bofh.it>
In reply to#86554
On Sat, Mar 22, 2025 at 07:55:01PM +0100, Salvatore Bonaccorso wrote:
> Hi John,
> 
> On Fri, Nov 29, 2024 at 10:12:52PM +0100, Salvatore Bonaccorso wrote:
> > Hi John,
> > 
> > On Sat, Aug 03, 2024 at 09:35:25PM +0200, Salvatore Bonaccorso wrote:
> > > Hi John,
> > > 
> > > On Sun, May 26, 2024 at 01:39:07PM +0200, Salvatore Bonaccorso wrote:
> > > > Hi,
> > > > 
> > > > For those watching this bug: John has prepared backports in his tree,
> > > > with both approaches:
> > > > 
> > > > https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor.git/log/?h=debian-two-patch-1780227
> > > > 
> > > > and
> > > > 
> > > > https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor.git/log/?h=debian-backport-1780227
> > > > 
> > > > (but with the open question which one will be submitted for stable.
> > > > >From upstream stable point of view probably the two patch backport
> > > > approach would be the preferred one).
> > > 
> > > We still have tis issue open for 6.1.y upstream TTBOMK. If you are
> > > confident as maintainer with any of the two approaches, would it be
> > > possible to submit them for stable? If the preferred one get then
> > > accepted and queued, we might already cherry-pick the solution for us,
> > > but at this point we can wait for the respective 6.1.y stable version
> > > which will include the fix.
> > 
> > Friendly ping. Any news here?
> 
> Anything we can do there to help on the decision which set of fixes
> could land in the 6.1.y stable series? Would it help if I prod Mathias
> to test both variants for feedback? 
> 
> Or is there a problem you envision already by trying to backport those
> fixes to upstream 6.1.y?
> 
> Thanks for your work, and sorry for pestering you again about it :(

Any news on this?

While at it, I noticed that in the above commits for
https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor.git/log/?h=debian-two-patch-1780227
or
https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor.git/log/?h=debian-backport-1780227

it might be worth adding a

Link: https://bugs.debian.org/1050256

Do you see any problems with any of the both you prepared? If not, is
there soemthing which you miss from us downstream?

Regards,
Salvatore

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web