From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH] apparmor: fix label replacement compiled out of __label_insert()
Date: Thu, 19 Nov 2026 20:42:00 +0000 [thread overview]
Message-ID: <sashiko-outbox-224039@kernel.org> (raw)
In-Reply-To: <20261119203650.51147-1-andrew.kroh@xata.io>
> __label_insert() replaces an equal label in the labelset from inside
> an assertion.
>
> AA_BUG(!__label_replace(this, label));
>
> AA_BUG() evaluates its argument only if
> CONFIG_SECURITY_APPARMOR_DEBUG_ASSERTS is set. That option depends on
> CONFIG_SECURITY_APPARMOR_DEBUG, which is off by default. Without it,
> the compiler discards the call to __label_replace(). The new label
> does not go into the tree and does not get FLAG_IN_TREE. The caller,
> __label_update(), then removes the old label from the tree.
>
> The proxy of the old label points to the new label. A task that
> holds the old label therefore moves to the new label after the first
> profile replacement. The new label is not in the labelset, so
> [ ... ]
> result.
>
> Fixes: f1bd904175e8 ("apparmor: add the base fns() for domain labels")
> Cc: stable@vger.kernel.org
> Signed-off-by: Andrew Kroh <andrew.kroh@xata.io>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261119203650.51147-1-andrew.kroh@xata.io?part=1
prev parent reply other threads:[~2026-11-19 20:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 20:36 [PATCH] apparmor: fix label replacement compiled out of __label_insert() Andrew Kroh
2026-11-19 20:42 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-224039@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox