* linux-next: manual merge of the audit tree with the origin tree
@ 2026-10-16 12:28 Mark Brown
2026-10-16 13:49 ` Paul Moore
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2026-10-16 12:28 UTC (permalink / raw)
To: Paul Moore
Cc: Jérémy Jean, Linux Kernel Mailing List,
Linux Next Mailing List, Stanislav Kinsburskii
[-- Attachment #1: Type: text/plain, Size: 1662 bytes --]
Hi all,
Today's linux-next merge of the audit tree got a conflict in:
kernel/audit_tree.c
between commit:
aa650d87a4988 ("audit: fix exe mark UAF in kill_rules()")
from the origin tree and commit:
ca12826b4aac8 ("audit: Fix filter rule accounting after automatic removal")
from the audit tree. I'm really unsure about this merge, it's not clear
to me if the unaccounting should go in the initial loop or the RCU free
loop.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc kernel/audit_tree.c
index f2e81be8265e8,2d68d2ec2b2a1..0000000000000
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@@ -573,9 -550,17 +573,10 @@@ static void kill_rules(struct audit_con
entry = container_of(rule, struct audit_entry, rule);
list_del_init(&rule->rlist);
- if (rule->tree) {
- /* not a half-baked one */
- audit_tree_log_remove_rule(context, rule);
- if (entry->rule.exe)
- audit_remove_mark(entry->rule.exe);
- rule->tree = NULL;
- list_del_rcu(&entry->list);
- list_del(&entry->rule.list);
- audit_rule_unaccount(rule);
- call_rcu(&entry->rcu, audit_free_rule_rcu);
- }
+ if (entry->rule.exe)
+ audit_remove_mark(entry->rule.exe);
++ audit_rule_unaccount(rule);
+ call_rcu(&entry->rcu, audit_free_rule_rcu);
}
}
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: linux-next: manual merge of the audit tree with the origin tree
2026-10-16 12:28 linux-next: manual merge of the audit tree with the origin tree Mark Brown
@ 2026-10-16 13:49 ` Paul Moore
0 siblings, 0 replies; 2+ messages in thread
From: Paul Moore @ 2026-10-16 13:49 UTC (permalink / raw)
To: Mark Brown
Cc: Jérémy Jean, Linux Kernel Mailing List,
Linux Next Mailing List, Stanislav Kinsburskii
On Fri, Oct 16, 2026 at 8:28 AM Mark Brown <broonie@kernel.org> wrote:
>
> Hi all,
>
> Today's linux-next merge of the audit tree got a conflict in:
>
> kernel/audit_tree.c
>
> between commit:
>
> aa650d87a4988 ("audit: fix exe mark UAF in kill_rules()")
>
> from the origin tree and commit:
>
> ca12826b4aac8 ("audit: Fix filter rule accounting after automatic removal")
>
> from the audit tree. I'm really unsure about this merge, it's not clear
> to me if the unaccounting should go in the initial loop or the RCU free
> loop.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
Hi Mark,
My apologies, I was preparing the audit branches for the upcoming
merge window and it looks like I pushed an experiment to the next
branch and never corrected it. I'm sorry about that. It should be
fixed now, but of course if you see any additional problems please let
me know.
In case anyone is curious, this is the merge fixup that was in the
audit/next branch previously, and what is in there once again:
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
index f2e81be8265e..e83b9fef048f 100644
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@ -558,6 +558,7 @@ static void kill_rules(struct audit_context *context, struct
audit_tree *tree)
list_del(&entry->rule.list);
if (entry->rule.exe)
need_sync = true;
+ audit_rule_unaccount(rule);
} else {
list_del_init(&rule->rlist);
}
--
paul-moore.com
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-16 13:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-16 12:28 linux-next: manual merge of the audit tree with the origin tree Mark Brown
2026-10-16 13:49 ` Paul Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox